summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_long_future.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-15 16:59:06 (GMT)
committerGuido van Rossum <guido@python.org>2007-01-15 16:59:06 (GMT)
commite2a383d062434c05b73031f0da57fe82b9da8942 (patch)
tree1a6fb6b2c056a10ee227dbc75855b3fac6153414 /Lib/test/test_long_future.py
parentfc7bb8c786fd9cb3b1ab84e1976620d0ab545777 (diff)
downloadcpython-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_long_future.py')
-rw-r--r--Lib/test/test_long_future.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_long_future.py b/Lib/test/test_long_future.py
index 074c148..3f137d6 100644
--- a/Lib/test/test_long_future.py
+++ b/Lib/test/test_long_future.py
@@ -8,16 +8,16 @@ from test.test_support import TestFailed, verify, verbose
def test_true_division():
if verbose:
print "long true division"
- huge = 1L << 40000
+ huge = 1 << 40000
mhuge = -huge
verify(huge / huge == 1.0)
verify(mhuge / mhuge == 1.0)
verify(huge / mhuge == -1.0)
verify(mhuge / huge == -1.0)
verify(1 / huge == 0.0)
- verify(1L / huge == 0.0)
+ verify(1 / huge == 0.0)
+ verify(1 / mhuge == 0.0)
verify(1 / mhuge == 0.0)
- verify(1L / mhuge == 0.0)
verify((666 * huge + (huge >> 1)) / huge == 666.5)
verify((666 * mhuge + (mhuge >> 1)) / mhuge == 666.5)
verify((666 * huge + (huge >> 1)) / mhuge == -666.5)
@@ -28,8 +28,8 @@ def test_true_division():
namespace = {'huge': huge, 'mhuge': mhuge}
for overflow in ["float(huge)", "float(mhuge)",
- "huge / 1", "huge / 2L", "huge / -1", "huge / -2L",
- "mhuge / 100", "mhuge / 100L"]:
+ "huge / 1", "huge / 2", "huge / -1", "huge / -2",
+ "mhuge / 100", "mhuge / 100"]:
try:
eval(overflow, namespace)
except OverflowError:
@@ -37,14 +37,14 @@ def test_true_division():
else:
raise TestFailed("expected OverflowError from %r" % overflow)
- for underflow in ["1 / huge", "2L / huge", "-1 / huge", "-2L / huge",
- "100 / mhuge", "100L / mhuge"]:
+ for underflow in ["1 / huge", "2 / huge", "-1 / huge", "-2 / huge",
+ "100 / mhuge", "100 / mhuge"]:
result = eval(underflow, namespace)
if result != 0.0:
raise TestFailed("expected underflow to 0 from %r" % underflow)
- for zero in ["huge / 0", "huge / 0L",
- "mhuge / 0", "mhuge / 0L"]:
+ for zero in ["huge / 0", "huge / 0",
+ "mhuge / 0", "mhuge / 0"]:
try:
eval(zero, namespace)
except ZeroDivisionError: