projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d7234d
)
Added some underflow-to-0.0 long/long true division tests.
author
Tim Peters
<tim.peters@gmail.com>
Thu, 6 Sep 2001 22:03:36 +0000
(22:03 +0000)
committer
Tim Peters
<tim.peters@gmail.com>
Thu, 6 Sep 2001 22:03:36 +0000
(22:03 +0000)
Lib/test/test_long_future.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_long_future.py
b/Lib/test/test_long_future.py
index 9321f70e246ff5db229c32851b76e3a56e52e68f..03d09fca5366facb1bbe1fb03fc62989ec691e98 100644
(file)
--- 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: