summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_long_future.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-06 22:03:36 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-06 22:03:36 (GMT)
commit4bd810aaf215028fd0f512fd646e86ed6e27038d (patch)
tree646d364591c3ef6e00f1d795571ebd7da96320f1 /Lib/test/test_long_future.py
parent8d7234d1dcd8dcfb8f2d928f3ee5c54a08ecd5b4 (diff)
downloadcpython-4bd810aaf215028fd0f512fd646e86ed6e27038d.zip
cpython-4bd810aaf215028fd0f512fd646e86ed6e27038d.tar.gz
cpython-4bd810aaf215028fd0f512fd646e86ed6e27038d.tar.bz2
Added some underflow-to-0.0 long/long true division tests.
Diffstat (limited to 'Lib/test/test_long_future.py')
-rw-r--r--Lib/test/test_long_future.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_long_future.py b/Lib/test/test_long_future.py
index 9321f70..03d09fc 100644
--- a/Lib/test/test_long_future.py
+++ b/Lib/test/test_long_future.py
@@ -37,6 +37,12 @@ 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"]:
+ result = eval(underflow, namespace)
+ if result != 0.0:
+ raise TestFailed("expected undeflow to 0 from %r" % undeflow)
+
for zero in ["huge / 0", "huge / 0L",
"mhuge / 0", "mhuge / 0L"]:
try: