diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-08-27 21:45:32 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-08-27 21:45:32 (GMT) |
commit | c15a82813acd556c93cdea6db3d40413e34e422a (patch) | |
tree | c506033af18d55e7b69ea152a1e13a9a5bc97a02 /Lib | |
parent | 3c06b9a7d4fa144eebd4786f71c4a301726e0c3c (diff) | |
download | cpython-c15a82813acd556c93cdea6db3d40413e34e422a.zip cpython-c15a82813acd556c93cdea6db3d40413e34e422a.tar.gz cpython-c15a82813acd556c93cdea6db3d40413e34e422a.tar.bz2 |
Change test_overflow to test_no_overflow; looks like big int literals
are auto-coerced to longs now, but this test still expected OverflowError.
I can't imagine this test failure was unique to Windows.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_unary.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py index 0419167..3402c55 100644 --- a/Lib/test/test_unary.py +++ b/Lib/test/test_unary.py @@ -27,10 +27,11 @@ class UnaryOpTestCase(unittest.TestCase): self.assert_(--2 == 2) self.assert_(-2L == 0 - 2L) - def test_overflow(self): - self.assertRaises(OverflowError, eval, "+" + ("9" * 32)) - self.assertRaises(OverflowError, eval, "-" + ("9" * 32)) - self.assertRaises(OverflowError, eval, "~" + ("9" * 32)) + def test_no_overflow(self): + nines = "9" * 32 + self.assert_(eval("+" + nines) == eval("+" + nines + "L")) + self.assert_(eval("-" + nines) == eval("-" + nines + "L")) + self.assert_(eval("~" + nines) == eval("~" + nines + "L")) def test_bad_types(self): for op in '+', '-', '~': |