summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-08-27 16:40:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-08-27 16:40:23 (GMT)
commit9594942716a8f9c557b85d31751753d89cd7cebf (patch)
tree847ee3a06cf8831731d4aa0adaee961accc74fda /Lib/test
parent4af4d273bd2c18e8e3d56dc43a877ce04a5a1e13 (diff)
downloadcpython-9594942716a8f9c557b85d31751753d89cd7cebf.zip
cpython-9594942716a8f9c557b85d31751753d89cd7cebf.tar.gz
cpython-9594942716a8f9c557b85d31751753d89cd7cebf.tar.bz2
Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_cmath.py2
-rw-r--r--Lib/test/test_compile.py2
-rw-r--r--Lib/test/test_decimal.py2
-rw-r--r--Lib/test/test_gdb.py2
-rw-r--r--Lib/test/test_itertools.py14
-rw-r--r--Lib/test/test_long.py15
-rw-r--r--Lib/test/test_struct.py2
-rw-r--r--Lib/test/test_sys.py2
8 files changed, 17 insertions, 24 deletions
diff --git a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py
index 692ea36..4db6b2b 100644
--- a/Lib/test/test_cmath.py
+++ b/Lib/test/test_cmath.py
@@ -253,7 +253,7 @@ class CMathTests(unittest.TestCase):
self.assertRaises(SomeException, f, MyComplexExceptionOS())
def test_input_type(self):
- # ints and longs should be acceptable inputs to all cmath
+ # ints should be acceptable inputs to all cmath
# functions, by virtue of providing a __float__ method
for f in self.test_functions:
for arg in [2, 2.]:
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 1071f4a..ccd08db 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -198,7 +198,7 @@ if 1:
else:
self.fail("How many bits *does* this machine have???")
# Verify treatment of constant folding on -(sys.maxsize+1)
- # i.e. -2147483648 on 32 bit platforms. Should return int, not long.
+ # i.e. -2147483648 on 32 bit platforms. Should return int.
self.assertIsInstance(eval("%s" % (-sys.maxsize - 1)), int)
self.assertIsInstance(eval("%s" % (-sys.maxsize - 2)), int)
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 50a9ad4..71b93a6 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -1838,7 +1838,7 @@ class UsabilityTest(unittest.TestCase):
self.assertIs(max(d1,d2), d2)
self.assertIs(max(d2,d1), d2)
- #between Decimal and long
+ #between Decimal and int
self.assertIs(min(d1,l2), d1)
self.assertIs(min(l2,d1), d1)
self.assertIs(max(l1,d2), d2)
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index abcb23e..6c3f467 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -227,7 +227,7 @@ class PrettyPrintTests(DebuggerTests):
% (gdb_repr, exp_repr, gdb_output)))
def test_int(self):
- 'Verify the pretty-printing of various "int"/long values'
+ 'Verify the pretty-printing of various int values'
self.assertGdbRepr(42)
self.assertGdbRepr(0)
self.assertGdbRepr(-7)
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 53926a9..514a6b7 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -505,9 +505,9 @@ class TestBasicOps(unittest.TestCase):
self.assertEqual(repr(count(10.25)), 'count(10.25)')
self.assertEqual(next(c), -8)
for i in (-sys.maxsize-5, -sys.maxsize+5 ,-10, -1, 0, 10, sys.maxsize-5, sys.maxsize+5):
- # Test repr (ignoring the L in longs)
- r1 = repr(count(i)).replace('L', '')
- r2 = 'count(%r)'.__mod__(i).replace('L', '')
+ # Test repr
+ r1 = repr(count(i))
+ r2 = 'count(%r)'.__mod__(i)
self.assertEqual(r1, r2)
# check copy, deepcopy, pickle
@@ -555,12 +555,12 @@ class TestBasicOps(unittest.TestCase):
self.assertEqual(repr(count(10.5, 1.00)), 'count(10.5, 1.0)') # do show float values lilke 1.0
for i in (-sys.maxsize-5, -sys.maxsize+5 ,-10, -1, 0, 10, sys.maxsize-5, sys.maxsize+5):
for j in (-sys.maxsize-5, -sys.maxsize+5 ,-10, -1, 0, 1, 10, sys.maxsize-5, sys.maxsize+5):
- # Test repr (ignoring the L in longs)
- r1 = repr(count(i, j)).replace('L', '')
+ # Test repr
+ r1 = repr(count(i, j))
if j == 1:
- r2 = ('count(%r)' % i).replace('L', '')
+ r2 = ('count(%r)' % i)
else:
- r2 = ('count(%r, %r)' % (i, j)).replace('L', '')
+ r2 = ('count(%r, %r)' % (i, j))
self.assertEqual(r1, r2)
self.pickletest(count(i, j))
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py
index b417bea..baf1d6a 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):
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index 22374d2..50cae05 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -278,7 +278,7 @@ class StructTest(unittest.TestCase):
# Objects with an '__index__' method should be allowed
# to pack as integers. That is assuming the implemented
- # '__index__' method returns and 'int' or 'long'.
+ # '__index__' method returns an 'int'.
class Indexable(object):
def __init__(self, value):
self._value = value
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 9d97c8d..bc4c0ad 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -767,7 +767,7 @@ class SizeofTest(unittest.TestCase):
check(iter([]), size('lP'))
# listreverseiterator (list)
check(reversed([]), size('nP'))
- # long
+ # int
check(0, vsize(''))
check(1, vsize('') + self.longdigit)
check(-1, vsize('') + self.longdigit)