From f36dbda7cefcb189b48a1b65e78ea2255550afe2 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 21 Feb 2009 22:33:02 +0100 Subject: [PATCH] work around Python inconsistency in test case --- tests/run/size_t.pyx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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): ... -- 2.26.2