[pypy-commit] pypy numpy-record-dtypes: boring a passing test

fijal noreply at buildbot.pypy.org
Sat Feb 18 17:40:30 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-record-dtypes
Changeset: r52612:847b64f81dd5
Date: 2012-02-18 18:40 +0200
http://bitbucket.org/pypy/pypy/changeset/847b64f81dd5/

Log:	boring a passing test

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
@@ -1824,11 +1824,17 @@
         a['x'][0] = 15
         assert a['x'][0] == 15
         b = a['x'] + a['y']
-        print b, a
         assert (b == [15+2, 3+4]).all()
         assert b.dtype == float
 
-    def test_creation(self):
+    def test_assign_tuple(self):
+        from _numpypy import zeros
+        a = zeros((2, 3), dtype=[('x', int), ('y', float)])
+        a[1, 2] = (1, 2)
+        assert a['x'][1, 2] == 1
+        assert a['y'][1, 2] == 2
+
+    def test_creation_and_repr(self):
         from _numpypy import array
         a = array([(1, 2), (3, 4)], dtype=[('x', int), ('y', float)])
         assert repr(a[0]) == '(1, 2.0)'


More information about the pypy-commit mailing list