diff --git a/tests/run/new_style_exceptions.pyx b/tests/run/new_style_exceptions.pyx index 34c8bd6621dfa81e7f06b0414d4105b5ab4329e8..4dfcf375bb26d25e1da8a79612fea2bb9bf4746c 100644 --- a/tests/run/new_style_exceptions.pyx +++ b/tests/run/new_style_exceptions.pyx @@ -1,15 +1,15 @@ __doc__ = """ >>> test(Exception('hi')) Raising: Exception('hi',) - Caught: <type 'exceptions.Exception'> Exception('hi',) + Caught: Exception('hi',) """ import sys def test(obj): - print "Raising:", repr(obj) + print "Raising: %s%r" % (obj.__class__.__name__, obj.args) try: raise obj except: info = sys.exc_info() - print "Caught: %r %r" % (info[0], info[1]) + print "Caught: %s%r" % (obj.__class__.__name__, obj.args)