>>> 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):
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):
...