diff options
author | Guido van Rossum <guido@python.org> | 2006-08-18 16:29:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-18 16:29:54 (GMT) |
commit | d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 (patch) | |
tree | 40f4d5d4a9d117979b4d803a3fba0a17df3af699 /Lib | |
parent | f43127862d1c5d9e377ede09f86ab1e8f6dfab2f (diff) | |
download | cpython-d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1.zip cpython-d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1.tar.gz cpython-d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1.tar.bz2 |
repr() of a long int no longer produces a trailing 'L'.
More unit tests probably need fixing; later...
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_long.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py index 7b0c7b0..92fe7a1 100644 --- a/Lib/test/test_long.py +++ b/Lib/test/test_long.py @@ -196,7 +196,7 @@ class LongTest(unittest.TestCase): def slow_format(self, x, base): if (x, base) == (0, 8): # this is an oddball! - return "0L" + return "0" digits = [] sign = 0 if x < 0: @@ -208,7 +208,7 @@ class LongTest(unittest.TestCase): digits = digits or [0] return '-'[:sign] + \ {8: '0', 10: '', 16: '0x'}[base] + \ - "".join(map(lambda i: "0123456789abcdef"[i], digits)) + "L" + "".join(map(lambda i: "0123456789abcdef"[i], digits)) def check_format_1(self, x): for base, mapper in (8, oct), (10, repr), (16, hex): @@ -221,7 +221,7 @@ class LongTest(unittest.TestCase): # str() has to be checked a little differently since there's no # trailing "L" got = str(x) - expected = self.slow_format(x, 10)[:-1] + expected = self.slow_format(x, 10) msg = Frm("%s returned %r but expected %r for %r", mapper.__name__, got, expected, x) self.assertEqual(got, expected, msg) |