fix test case and make it really test the expected exception type
authorStefan Behnel <scoder@users.berlios.de>
Fri, 2 May 2008 08:12:09 +0000 (10:12 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 2 May 2008 08:12:09 +0000 (10:12 +0200)
Cython/Compiler/Version.py
tests/run/new_style_exceptions.pyx

index 0cb27c7241b93ea22b9bdec8952c6e6aa38db347..83b473fa854311e969e991846a49e6a243afc327 100644 (file)
@@ -1 +1 @@
-version = '0.9.6.13.1'
+version = '0.9.6.14'
index 4dfcf375bb26d25e1da8a79612fea2bb9bf4746c..9dbd97cb0df360f4aefb417edc1f0fc11ea10971 100644 (file)
@@ -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)