From: Stefan Behnel Date: Fri, 2 May 2008 08:12:09 +0000 (+0200) Subject: fix test case and make it really test the expected exception type X-Git-Tag: 0.9.8rc1~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f592130929febfa1b21fd3aa0edebd134049770e;p=cython.git fix test case and make it really test the expected exception type --- diff --git a/Cython/Compiler/Version.py b/Cython/Compiler/Version.py index 0cb27c72..83b473fa 100644 --- a/Cython/Compiler/Version.py +++ b/Cython/Compiler/Version.py @@ -1 +1 @@ -version = '0.9.6.13.1' +version = '0.9.6.14' diff --git a/tests/run/new_style_exceptions.pyx b/tests/run/new_style_exceptions.pyx index 4dfcf375..9dbd97cb 100644 --- a/tests/run/new_style_exceptions.pyx +++ b/tests/run/new_style_exceptions.pyx @@ -4,7 +4,7 @@ __doc__ = """ Caught: Exception('hi',) """ -import sys +import sys, types def test(obj): print "Raising: %s%r" % (obj.__class__.__name__, obj.args) @@ -12,4 +12,8 @@ def test(obj): raise obj except: info = sys.exc_info() - print "Caught: %s%r" % (obj.__class__.__name__, obj.args) + if sys.version_info >= (2,5): + assert isinstance(info[0], type) + else: + assert isinstance(info[0], types.ClassType) + print "Caught: %s%r" % (info[1].__class__.__name__, info[1].args)