Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r67710:177c957bd282
Date: 2013-10-29 17:21 -0400
http://bitbucket.org/pypy/pypy/changeset/177c957bd282/

Log:    these tests are pypy-specific

diff --git a/pypy/module/micronumpy/test/test_numarray.py 
b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -1350,7 +1350,9 @@
         assert a.argmax() == 5
         assert a.argmax(axis=None, out=None) == 5
         assert a[:2, ].argmax() == 3
-        raises(NotImplementedError, a.argmax, axis=0)
+        import sys
+        if '__pypy__' in sys.builtin_module_names:
+            raises(NotImplementedError, a.argmax, axis=0)
 
     def test_argmin(self):
         from numpypy import array
@@ -1359,7 +1361,9 @@
         assert a.argmin(axis=None, out=None) == 3
         b = array([])
         raises(ValueError, "b.argmin()")
-        raises(NotImplementedError, a.argmin, axis=0)
+        import sys
+        if '__pypy__' in sys.builtin_module_names:
+            raises(NotImplementedError, a.argmin, axis=0)
 
     def test_all(self):
         from numpypy import array
@@ -2214,7 +2218,9 @@
         b = a.T
         assert(b[:, 0] == a[0, :]).all()
         assert (a.transpose() == b).all()
-        raises(NotImplementedError, a.transpose, (1, 0, 2))
+        import sys
+        if '__pypy__' in sys.builtin_module_names:
+            raises(NotImplementedError, a.transpose, (1, 0, 2))
 
     def test_flatiter(self):
         from numpypy import array, flatiter, arange, zeros
diff --git a/pypy/module/micronumpy/test/test_sorting.py 
b/pypy/module/micronumpy/test/test_sorting.py
--- a/pypy/module/micronumpy/test/test_sorting.py
+++ b/pypy/module/micronumpy/test/test_sorting.py
@@ -18,7 +18,9 @@
 
             a = arange(100, dtype=dtype)
             assert (a.argsort() == a).all()
-        raises(NotImplementedError, 'arange(10,dtype="float16").argsort()')
+        import sys
+        if '__pypy__' in sys.builtin_module_names:
+            raises(NotImplementedError, 'arange(10,dtype="float16").argsort()')
 
     def test_argsort_ndim(self):
         from numpypy import array
@@ -76,8 +78,10 @@
             a = array([6, 4, -1, 3, 8, 3, 256+20, 100, 101], dtype=dtype)
             b = array([-1, 3, 3, 4, 6, 8, 100, 101, 256+20], dtype=dtype)
             c = a.copy()
-            exc = raises(NotImplementedError, a.sort)
-            assert exc.value[0].find('supported') >= 0
+            import sys
+            if '__pypy__' in sys.builtin_module_names:
+                exc = raises(NotImplementedError, a.sort)
+                assert exc.value[0].find('supported') >= 0
             #assert (a == b).all(), \
             #    'a,orig,dtype %r,%r,%r' % (a,c,dtype)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to