Author: Matti Picus <[email protected]>
Branch: win32-cleanup2
Changeset: r54250:c5f3e2ef91fd
Date: 2012-04-08 14:29 +0300
http://bitbucket.org/pypy/pypy/changeset/c5f3e2ef91fd/

Log:    force sign to be dfined for testing with float('nan')

diff --git a/pypy/module/micronumpy/test/test_ufuncs.py 
b/pypy/module/micronumpy/test/test_ufuncs.py
--- a/pypy/module/micronumpy/test/test_ufuncs.py
+++ b/pypy/module/micronumpy/test/test_ufuncs.py
@@ -270,8 +270,8 @@
         assert ([ninf, -1.0, -1.0, -1.0, 0.0, 1.0, 2.0, 1.0, inf] == 
ceil(a)).all()
         assert ([ninf, -1.0, -1.0, -1.0, 0.0, 1.0, 1.0, 0.0, inf] == 
trunc(a)).all()
         assert all([math.isnan(f(float("nan"))) for f in floor, ceil, trunc])
-        assert all([math.copysign(1, f(float("nan"))) == 1 for f in floor, 
ceil, trunc])
-        assert all([math.copysign(1, f(float("-nan"))) == -1 for f in floor, 
ceil, trunc])
+        assert all([math.copysign(1, f(abs(float("nan")))) == 1 for f in 
floor, ceil, trunc])
+        assert all([math.copysign(1, f(-abs(float("nan")))) == -1 for f in 
floor, ceil, trunc])
 
     def test_copysign(self):
         from _numpypy import array, copysign
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to