[pypy-commit] pypy matrixmath-dot: add failing test for sum return value

mattip noreply at buildbot.pypy.org
Mon Dec 5 22:42:15 CET 2011


Author: mattip
Branch: matrixmath-dot
Changeset: r50194:699511d4d5d5
Date: 2011-12-05 16:36 +0200
http://bitbucket.org/pypy/pypy/changeset/699511d4d5d5/

Log:	add failing test for sum return value

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
@@ -411,6 +411,7 @@
         b = a * a
         for i in range(5):
             assert b[i] == i * i
+        assert b.dtype is numpypy.dtype(int)
 
         a = numpypy.array(range(5), dtype=bool)
         b = a * a
@@ -629,8 +630,10 @@
     def test_sum(self):
         from numpypy import array
         a = array(range(5))
-        assert a.sum() == 10.0
-        assert a[:4].sum() == 6.0
+        b = a.sum()
+        assert b == 10
+        assert isinstance(b,int)
+        assert a[:4].sum() == 6
 
         a = array([True] * 5, bool)
         assert a.sum() == 5


More information about the pypy-commit mailing list