[pypy-svn] r69105 - pypy/branch/io-lang/pypy/lang/io/test
david at codespeak.net
david at codespeak.net
Mon Nov 9 21:28:41 CET 2009
Author: david
Date: Mon Nov 9 21:28:40 2009
New Revision: 69105
Modified:
pypy/branch/io-lang/pypy/lang/io/test/test_number.py
Log:
fix number tests to work on python 2.5
Modified: pypy/branch/io-lang/pypy/lang/io/test/test_number.py
==============================================================================
--- pypy/branch/io-lang/pypy/lang/io/test/test_number.py (original)
+++ pypy/branch/io-lang/pypy/lang/io/test/test_number.py Mon Nov 9 21:28:40 2009
@@ -1,6 +1,15 @@
from pypy.lang.io.parserhack import interpret
from pypy.lang.io.model import W_Number
-from math import isnan, isinf
+import sys
+if sys.version_info < (2, 6):
+ def isnan(num):
+ return num != num
+ def isinf(num):
+ # not sure if this works with long
+ from sys import maxint
+ return num > maxint
+else:
+ from math import isnan, isinf
import py
def test_even_simpler():
More information about the Pypy-commit
mailing list