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_compile.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_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index b517daa..1acb4a1 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -182,10 +182,8 @@ if 1: self.assertRaises(SyntaxError, eval, arg) self.assertEqual(eval("0777"), 511) - self.assertEqual(eval("0777L"), 511) self.assertEqual(eval("000777"), 511) self.assertEqual(eval("0xff"), 255) - self.assertEqual(eval("0xffL"), 255) self.assertEqual(eval("0XfF"), 255) self.assertEqual(eval("0777."), 777) self.assertEqual(eval("0777.0"), 777) @@ -212,19 +210,19 @@ if 1: if sys.maxint == 2147483647: # 32-bit machine all_one_bits = '0xffffffff' - self.assertEqual(eval(all_one_bits), 4294967295L) - self.assertEqual(eval("-" + all_one_bits), -4294967295L) + self.assertEqual(eval(all_one_bits), 4294967295) + self.assertEqual(eval("-" + all_one_bits), -4294967295) elif sys.maxint == 9223372036854775807: # 64-bit machine all_one_bits = '0xffffffffffffffff' - self.assertEqual(eval(all_one_bits), 18446744073709551615L) - self.assertEqual(eval("-" + all_one_bits), -18446744073709551615L) + self.assertEqual(eval(all_one_bits), 18446744073709551615) + self.assertEqual(eval("-" + all_one_bits), -18446744073709551615) else: self.fail("How many bits *does* this machine have???") # Verify treatment of contant folding on -(sys.maxint+1) # i.e. -2147483648 on 32 bit platforms. Should return int, not long. self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 1)), int)) - self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 2)), long)) + self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 2)), int)) if sys.maxint == 9223372036854775807: def test_32_63_bit_values(self): |