[pypy-svn] r68513 - pypy/branch/gc-hash/pypy/objspace/std/test

arigo at codespeak.net arigo at codespeak.net
Thu Oct 15 21:37:31 CEST 2009


Author: arigo
Date: Thu Oct 15 21:37:31 2009
New Revision: 68513

Modified:
   pypy/branch/gc-hash/pypy/objspace/std/test/test_floatobject.py
Log:
Improve this test.


Modified: pypy/branch/gc-hash/pypy/objspace/std/test/test_floatobject.py
==============================================================================
--- pypy/branch/gc-hash/pypy/objspace/std/test/test_floatobject.py	(original)
+++ pypy/branch/gc-hash/pypy/objspace/std/test/test_floatobject.py	Thu Oct 15 21:37:31 2009
@@ -56,8 +56,10 @@
             32,              # answer on 32-bit machines
             137438953472)    # answer on 64-bit machines
         # testing special overflow values
-        assert hash(1e200 * 1e200) == 314159
-        assert hash(-1e200 * 1e200) == -271828
+        inf = 1e200 * 1e200
+        assert hash(inf) == 314159
+        assert hash(-inf) == -271828
+        assert hash(inf/inf) == 0
 
     def test_int_float(self):
         assert int(42.1234) == 42



More information about the Pypy-commit mailing list