Michael Blume avatar Michael Blume committed 723f22f

move array_equal tests to test_lib_pypy, as requested

Comments (0)

Files changed (2)

pypy/module/micronumpy/test/test_numarray.py

         assert a.shape == (3,)
         assert a.dtype is dtype(int)
 
-    def test_equal(self):
-        from _numpypy import array
-        from numpypy import array_equal
-        
-        a = [1, 2, 3]
-        b = [1, 2, 3]
-        
-        assert array_equal(a, b)
-        assert array_equal(a, array(b))
-        assert array_equal(array(a), b)
-        assert array_equal(array(a), array(b))
-
-    def test_not_equal(self):
-        from _numpypy import array
-        from numpypy import array_equal
-        
-        a = [1, 2, 3]
-        b = [1, 2, 4]
-        
-        assert not array_equal(a, b)
-        assert not array_equal(a, array(b))
-        assert not array_equal(array(a), b)
-        assert not array_equal(array(a), array(b))
-
-    def test_mismatched_shape(self):
-        from _numpypy import array
-        from numpypy import array_equal
-        
-        a = [1, 2, 3]
-        b = [[1, 2, 3], [1, 2, 3]]
-        
-        assert not array_equal(a, b)
-        assert not array_equal(a, array(b))
-        assert not array_equal(array(a), b)
-        assert not array_equal(array(a), array(b))
-
-
-
     def test_type(self):
         from _numpypy import array
         ar = array(range(5))

pypy/module/test_lib_pypy/numpypy/core/test_numeric.py

         assert str(b) == "[7 8 9]"
         b = a[2:1, ]
         assert str(b) == "[]"
+
+    def test_equal(self):
+        from _numpypy import array
+        from numpypy import array_equal
+        
+        a = [1, 2, 3]
+        b = [1, 2, 3]
+        
+        assert array_equal(a, b)
+        assert array_equal(a, array(b))
+        assert array_equal(array(a), b)
+        assert array_equal(array(a), array(b))
+
+    def test_not_equal(self):
+        from _numpypy import array
+        from numpypy import array_equal
+        
+        a = [1, 2, 3]
+        b = [1, 2, 4]
+        
+        assert not array_equal(a, b)
+        assert not array_equal(a, array(b))
+        assert not array_equal(array(a), b)
+        assert not array_equal(array(a), array(b))
+
+    def test_mismatched_shape(self):
+        from _numpypy import array
+        from numpypy import array_equal
+        
+        a = [1, 2, 3]
+        b = [[1, 2, 3], [1, 2, 3]]
+        
+        assert not array_equal(a, b)
+        assert not array_equal(a, array(b))
+        assert not array_equal(array(a), b)
+        assert not array_equal(array(a), array(b))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.