diff options
author | Guido van Rossum <guido@python.org> | 2007-01-15 16:59:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-01-15 16:59:06 (GMT) |
commit | e2a383d062434c05b73031f0da57fe82b9da8942 (patch) | |
tree | 1a6fb6b2c056a10ee227dbc75855b3fac6153414 /Lib/test/test_unary.py | |
parent | fc7bb8c786fd9cb3b1ab84e1976620d0ab545777 (diff) | |
download | cpython-e2a383d062434c05b73031f0da57fe82b9da8942.zip cpython-e2a383d062434c05b73031f0da57fe82b9da8942.tar.gz cpython-e2a383d062434c05b73031f0da57fe82b9da8942.tar.bz2 |
Rip out 'long' and 'L'-suffixed integer literals.
(Rough first cut.)
Diffstat (limited to 'Lib/test/test_unary.py')
-rw-r--r-- | Lib/test/test_unary.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py index 9854f64..1e07c15 100644 --- a/Lib/test/test_unary.py +++ b/Lib/test/test_unary.py @@ -9,7 +9,7 @@ class UnaryOpTestCase(unittest.TestCase): self.assert_(-2 == 0 - 2) self.assert_(-0 == 0) self.assert_(--2 == 2) - self.assert_(-2L == 0 - 2L) + self.assert_(-2 == 0 - 2) self.assert_(-2.0 == 0 - 2.0) self.assert_(-2j == 0 - 2j) @@ -17,7 +17,7 @@ class UnaryOpTestCase(unittest.TestCase): self.assert_(+2 == 2) self.assert_(+0 == 0) self.assert_(++2 == 2) - self.assert_(+2L == 2L) + self.assert_(+2 == 2) self.assert_(+2.0 == 2.0) self.assert_(+2j == 2j) @@ -25,13 +25,13 @@ class UnaryOpTestCase(unittest.TestCase): self.assert_(-2 == 0 - 2) self.assert_(-0 == 0) self.assert_(--2 == 2) - self.assert_(-2L == 0 - 2L) + self.assert_(-2 == 0 - 2) 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")) + self.assert_(eval("+" + nines) == 10**32-1) + self.assert_(eval("-" + nines) == -(10**32-1)) + self.assert_(eval("~" + nines) == ~(10**32-1)) def test_negation_of_exponentiation(self): # Make sure '**' does the right thing; these form a |