From 942e1a8553c65333dafd84385f7ea7adcad6a949 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 2 May 2008 09:08:08 +0200 Subject: [PATCH] make test for new style exceptions run on all Python versions by not actually testing for new style exceptions :) --- tests/run/new_style_exceptions.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run/new_style_exceptions.pyx b/tests/run/new_style_exceptions.pyx index 34c8bd66..4dfcf375 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: 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) -- 2.26.2