[pypy-svn] r74892 - pypy/trunk/pypy/objspace/std/test
fijal at codespeak.net
fijal at codespeak.net
Sat May 29 19:29:03 CEST 2010
Author: fijal
Date: Sat May 29 19:29:02 2010
New Revision: 74892
Modified:
pypy/trunk/pypy/objspace/std/test/test_floatobject.py
Log:
Fix tests for windows (hopefully)
Modified: pypy/trunk/pypy/objspace/std/test/test_floatobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/test/test_floatobject.py (original)
+++ pypy/trunk/pypy/objspace/std/test/test_floatobject.py Sat May 29 19:29:02 2010
@@ -92,9 +92,10 @@
def test_float_string(self):
assert 42 == float("42")
assert 42.25 == float("42.25")
- assert str(float("inf")).startswith("inf")
- assert str(float("-INf")).startswith("-inf")
- assert str(float("-nAn")).startswith("nan")
+ inf = 1e200*1e200
+ assert float("inf") == inf
+ assert float("-INf") == -inf
+ assert 'nan' in str(float("-nAn")).lower()
def test_float_unicode(self):
# u00A0 and u2000 are some kind of spaces
More information about the Pypy-commit
mailing list