[pypy-commit] pypy win32-cleanup2: remove/skip tests that check the sign of float('nan')

mattip noreply at buildbot.pypy.org
Wed Apr 11 11:19:16 CEST 2012


Author: Matti Picus <matti.picus at gmail.com>
Branch: win32-cleanup2
Changeset: r54281:1b052e5c79b5
Date: 2012-04-10 14:25 +0300
http://bitbucket.org/pypy/pypy/changeset/1b052e5c79b5/

Log:	remove/skip tests that check the sign of 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
@@ -233,12 +233,15 @@
         assert a[1] == 0
 
     def test_signbit(self):
-        from _numpypy import signbit, copysign
+        from _numpypy import signbit
 
-        assert (signbit([0, 0.0, 1, 1.0, float('inf'), float('nan')]) ==
-            [False, False, False, False, False, False]).all()
-        assert (signbit([-0, -0.0, -1, -1.0, float('-inf'), -float('nan'), float('-nan')]) ==
-            [False,  True,  True,  True,  True,  True, True]).all()
+        assert (signbit([0, 0.0, 1, 1.0, float('inf')]) ==
+            [False, False, False, False, False]).all()
+        assert (signbit([-0, -0.0, -1, -1.0, float('-inf')]) ==
+            [False,  True,  True,  True,  True]).all()
+        skip('sign of nan is non-determinant')
+        assert (signbit([float('nan'), float('-nan'), -float('nan')]) ==
+            [False, True, True]).all()    
 
     def test_reciporocal(self):
         from _numpypy import array, reciprocal


More information about the pypy-commit mailing list