mirror of
https://github.com/python/cpython.git
synced 2025-09-10 02:36:56 +00:00
Added some underflow-to-0.0 long/long true division tests.
This commit is contained in:
parent
8d7234d1dc
commit
4bd810aaf2
1 changed files with 6 additions and 0 deletions
|
@ -37,6 +37,12 @@ def test_true_division():
|
||||||
else:
|
else:
|
||||||
raise TestFailed("expected OverflowError from %r" % overflow)
|
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",
|
for zero in ["huge / 0", "huge / 0L",
|
||||||
"mhuge / 0", "mhuge / 0L"]:
|
"mhuge / 0", "mhuge / 0L"]:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue