[pypy-commit] pypy str-dtype-improvement: improve test coverage
mattip
noreply at buildbot.pypy.org
Wed Mar 20 21:16:23 CET 2013
Author: Matti Picus <matti.picus at gmail.com>
Branch: str-dtype-improvement
Changeset: r62559:4f6b118f7561
Date: 2013-03-20 12:40 -0700
http://bitbucket.org/pypy/pypy/changeset/4f6b118f7561/
Log: improve test coverage
diff --git a/pypy/module/micronumpy/interp_boxes.py b/pypy/module/micronumpy/interp_boxes.py
--- a/pypy/module/micronumpy/interp_boxes.py
+++ b/pypy/module/micronumpy/interp_boxes.py
@@ -294,10 +294,6 @@
arr.storage[i] = arg[i]
return W_StringBox(arr, 0, arr.dtype)
- def convert_to(self, dtype):
- from pypy.module.micronumpy import types
- assert isinstance(dtype.itemtype, types.StringType)
- return self
class W_UnicodeBox(W_CharacterBox):
def descr__new__unicode_box(space, w_subtype, w_arg):
@@ -311,11 +307,6 @@
# arr.storage[i] = arg[i]
return W_UnicodeBox(arr, 0, arr.dtype)
- def convert_to(self, dtype):
- from pypy.module.micronumpy import types
- assert isinstance(dtype.itemtype, types.UnicodeType)
- return self
-
class W_ComplexFloatingBox(W_InexactBox):
_attrs_ = ()
diff --git a/pypy/module/micronumpy/test/test_complex.py b/pypy/module/micronumpy/test/test_complex.py
--- a/pypy/module/micronumpy/test/test_complex.py
+++ b/pypy/module/micronumpy/test/test_complex.py
@@ -527,7 +527,8 @@
b = a.real
assert b == array(3)
a.real = 1024
- assert a.real == 1024
+ a.imag = 2048
+ assert a.real == 1024 and a.imag == 2048
assert a.imag == array(4)
assert b.dtype == dtype(float)
a = array(4.0)
More information about the pypy-commit
mailing list