Format test strings for Python 3 type reprs