[Python-checkins] CVS: python/dist/src/Lib/test test_long_future.py,1.2,1.3
Tim Peters
tim_one@users.sourceforge.net
Thu, 06 Sep 2001 15:03:38 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv15638/python/Lib/test
Modified Files:
test_long_future.py
Log Message:
Added some underflow-to-0.0 long/long true division tests.
Index: test_long_future.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_long_future.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_long_future.py 2001/09/04 06:33:00 1.2
--- test_long_future.py 2001/09/06 22:03:36 1.3
***************
*** 38,41 ****
--- 38,47 ----
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"]: