work around Python inconsistency in test case
authorStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 21:33:02 +0000 (22:33 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 21 Feb 2009 21:33:02 +0000 (22:33 +0100)
tests/run/size_t.pyx

index 0ef62b0250320da19a65fcb6bbd63775f8b81a98..dbabc47835d13c5f92b6c428892c27e7b810ddfb 100644 (file)
@@ -8,10 +8,9 @@ __doc__ = u"""
 >>> str(test((1<<32)-1))
 '4294967295'
 
->>> test(-1) #doctest: +ELLIPSIS
-Traceback (most recent call last):
-    ...
-OverflowError: ...
+>>> try: test(-1)
+... except (OverflowError, TypeError): print("ERROR")
+ERROR
 
 >>> test(1<<128) #doctest: +ELLIPSIS
 Traceback (most recent call last):
@@ -25,10 +24,9 @@ True
 True
 >>> a.foo(5)
 5
->>> a.foo(-1) #doctest: +ELLIPSIS
-Traceback (most recent call last):
-    ...
-OverflowError: ...
+>>> try: a.foo(-1)
+... except (OverflowError, TypeError): print("ERROR")
+ERROR
 >>> a.foo(1 << 180) #doctest: +ELLIPSIS
 Traceback (most recent call last):
     ...