diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_descr.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 8a6a538..8ef7979 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -458,12 +458,20 @@ def ints(): class C(int): def __add__(self, other): return NotImplemented + vereq(C(5L), 5) try: C() + "" except TypeError: pass else: raise TestFailed, "NotImplemented should have caused TypeError" + import sys + try: + C(sys.maxint+1) + except OverflowError: + pass + else: + raise TestFailed, "should have raised OverflowError" def longs(): if verbose: print "Testing long operations..." |