From: Stefan Behnel Date: Sat, 21 Feb 2009 21:33:02 +0000 (+0100) Subject: work around Python inconsistency in test case X-Git-Tag: 0.11.rc~59 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f36dbda7cefcb189b48a1b65e78ea2255550afe2;p=cython.git work around Python inconsistency in test case --- diff --git a/tests/run/size_t.pyx b/tests/run/size_t.pyx index 0ef62b02..dbabc478 100644 --- a/tests/run/size_t.pyx +++ b/tests/run/size_t.pyx @@ -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): ...