[pypy-commit] pypy remove-numpypy: flexible_repr lives in numpy core
bdkearns
noreply at buildbot.pypy.org
Tue Oct 29 22:34:40 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch: remove-numpypy
Changeset: r67709:e4361c7a16d5
Date: 2013-10-29 17:20 -0400
http://bitbucket.org/pypy/pypy/changeset/e4361c7a16d5/
Log: flexible_repr lives in numpy core
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
@@ -2706,6 +2706,8 @@
from numpypy import array
assert repr(array([1, 2, 3])) == 'array([1, 2, 3])'
assert str(array([1, 2, 3])) == 'array([1, 2, 3])'
+ assert repr(array(['abc'], 'S3')) == "array(['abc'])"
+ assert str(array(['abc'], 'S3')) == "array(['abc'])"
def teardown_class(cls):
if option.runappdirect:
@@ -2849,19 +2851,6 @@
assert str(a.dtype) == '|S1'
assert a == 'x'
- def test_flexible_repr(self):
- from numpypy import array
- a = array(['abc'],'S3')
- s = repr(a)
- # simplify test for \n in repr
- assert s.replace('\n', '') == "array(['abc'], dtype='|S3')"
- # but make sure it exists
- assert s.find('\n') == 15
- a = array(['abc','defg','ab'])
- s = repr(a)
- assert s.replace('\n', '') == \
- "array(['abc', 'defg', 'ab'], dtype='|S4')"
-
def test_pickle(self):
from numpypy import dtype, array
from cPickle import loads, dumps
More information about the pypy-commit
mailing list