summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-12-05 00:30:09 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-12-05 00:30:09 (GMT)
commit6d30c3e39110e90d90066208d1f05240d51f91e1 (patch)
tree97f4be325e698adb9d0f5f47bb490695b0c59539 /Lib
parenta3c01ce696cdbc0d8236a002cc76103db5662a1b (diff)
downloadcpython-6d30c3e39110e90d90066208d1f05240d51f91e1.zip
cpython-6d30c3e39110e90d90066208d1f05240d51f91e1.tar.gz
cpython-6d30c3e39110e90d90066208d1f05240d51f91e1.tar.bz2
Change new tests to use integer division (// instead of /).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 3af3113..2ea0c6b 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -74,7 +74,7 @@ if not (xsize*ysize*zsize == zsize*xsize*ysize == 338912):
# And another.
m = -sys.maxint - 1
for divisor in 1, 2, 4, 8, 16, 32:
- j = m / divisor
+ j = m // divisor
prod = divisor * j
if prod != m:
raise TestFailed, "%r * %r == %r != %r" % (divisor, j, prod, m)
@@ -83,7 +83,7 @@ for divisor in 1, 2, 4, 8, 16, 32:
type(prod))
# Check for expected * overflow to long.
for divisor in 1, 2, 4, 8, 16, 32:
- j = m / divisor - 1
+ j = m // divisor - 1
prod = divisor * j
if type(prod) is not long:
raise TestFailed, ("expected type(%r) to be long, not %r" %
@@ -91,7 +91,7 @@ for divisor in 1, 2, 4, 8, 16, 32:
# Check for expected * overflow to long.
m = sys.maxint
for divisor in 1, 2, 4, 8, 16, 32:
- j = m / divisor + 1
+ j = m // divisor + 1
prod = divisor * j
if type(prod) is not long:
raise TestFailed, ("expected type(%r) to be long, not %r" %