diff options
Diffstat (limited to 'Lib/test/test_b1.py')
-rw-r--r-- | Lib/test/test_b1.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py index 249f1fa76f..3033667d96 100644 --- a/Lib/test/test_b1.py +++ b/Lib/test/test_b1.py @@ -438,17 +438,19 @@ try: except: raise TestFailed, "int(%s)" % `s[1:]` + " should return long" try: - int(1e100) + x = int(1e100) except OverflowError: - pass + raise TestFailed("int(1e100) mustn't raise OverflowError") else: - raise TestFailed("int(1e100) expected OverflowError") + if not isinstance(x, long): + raise TestFailed("int(1e100) should have returned long") try: - int(-1e100) + x = int(-1e100) except OverflowError: - pass + raise TestFailed("int(-1e100) mustn't raise OverflowError") else: - raise TestFailed("int(-1e100) expected OverflowError") + if not isinstance(x, long): + raise TestFailed("int(-1e100) should have returned long") # SF bug 434186: 0x80000000/2 != 0x80000000>>1. |