summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_long.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-08-27 17:17:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-08-27 17:17:03 (GMT)
commit46e1ce214b5711e8dae63a1b5a0a7aafb371baf0 (patch)
tree0230554f5bd4df8804946f5bb0634cefdbbbd2ae /Lib/test/test_long.py
parent14e461d5b92000ec4e89182fa25ab0d5b5b31234 (diff)
parent9594942716a8f9c557b85d31751753d89cd7cebf (diff)
downloadcpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.zip
cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.tar.gz
cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.tar.bz2
Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
Diffstat (limited to 'Lib/test/test_long.py')
-rw-r--r--Lib/test/test_long.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py
index b598192..6c30fed 100644
--- a/Lib/test/test_long.py
+++ b/Lib/test/test_long.py
@@ -322,20 +322,13 @@ class LongTest(unittest.TestCase):
"".join("0123456789abcdef"[i] for i in digits)
def check_format_1(self, x):
- for base, mapper in (8, oct), (10, repr), (16, hex):
+ for base, mapper in (2, bin), (8, oct), (10, str), (10, repr), (16, hex):
got = mapper(x)
expected = self.slow_format(x, base)
msg = Frm("%s returned %r but expected %r for %r",
mapper.__name__, got, expected, x)
self.assertEqual(got, expected, msg)
self.assertEqual(int(got, 0), x, Frm('int("%s", 0) != %r', got, x))
- # str() has to be checked a little differently since there's no
- # trailing "L"
- got = str(x)
- 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)
def test_format(self):
for x in special:
@@ -553,11 +546,11 @@ class LongTest(unittest.TestCase):
def test_mixed_compares(self):
eq = self.assertEqual
- # We're mostly concerned with that mixing floats and longs does the
- # right stuff, even when longs are too large to fit in a float.
+ # We're mostly concerned with that mixing floats and ints does the
+ # right stuff, even when ints are too large to fit in a float.
# The safest way to check the results is to use an entirely different
# method, which we do here via a skeletal rational class (which
- # represents all Python ints, longs and floats exactly).
+ # represents all Python ints and floats exactly).
class Rat:
def __init__(self, value):
if isinstance(value, int):