Author: Richard Plangger <[email protected]>
Branch: py3.5-memoryview
Changeset: r86529:3ba72a821c80
Date: 2016-08-25 11:35 +0200
http://bitbucket.org/pypy/pypy/changeset/3ba72a821c80/

Log:    yes, the first failing test for memoryview tuple indexing

diff --git a/pypy/module/micronumpy/descriptor.py 
b/pypy/module/micronumpy/descriptor.py
--- a/pypy/module/micronumpy/descriptor.py
+++ b/pypy/module/micronumpy/descriptor.py
@@ -1048,6 +1048,7 @@
             return dtype
         if name[0] in 'VSUca' or name[0] in '<>=|' and name[1] in 'VSUca':
             return variable_dtype(space, name)
+        import pdb; pdb.set_trace()
         raise oefmt(space.w_TypeError, 'data type "%s" not understood', name)
     elif space.isinstance_w(w_dtype, space.w_list):
         return _set_metadata_and_copy( space, w_metadata,
diff --git a/pypy/module/micronumpy/test/__init__.py 
b/pypy/module/micronumpy/test/__init__.py
--- a/pypy/module/micronumpy/test/__init__.py
+++ b/pypy/module/micronumpy/test/__init__.py
@@ -1,2 +1,2 @@
 import py
-py.test.py3k_skip('not yet supported')
+# XXX py.test.py3k_skip('not yet supported')
diff --git a/pypy/module/micronumpy/test/dummy_module.py 
b/pypy/module/micronumpy/test/dummy_module.py
--- a/pypy/module/micronumpy/test/dummy_module.py
+++ b/pypy/module/micronumpy/test/dummy_module.py
@@ -20,7 +20,7 @@
 for t in types:
     globals()[t] = dtype(t).type
 
-types = ['bool', 'int', 'float', 'complex', 'str', 'string', 'unicode', 
'object']
+types = ['bool', 'int', 'float', 'complex', 'str', 'object']
 for t in types:
     globals()[t + '_'] = dtype(t).type
 del types
diff --git a/pypy/module/micronumpy/test/test_base.py 
b/pypy/module/micronumpy/test/test_base.py
--- a/pypy/module/micronumpy/test/test_base.py
+++ b/pypy/module/micronumpy/test/test_base.py
@@ -9,7 +9,7 @@
 
     @classmethod
     def setup_class(cls):
-        py.test.py3k_skip("micronumpy not supported on py3k")
+        # XXX py.test.py3k_skip("micronumpy not supported on py3k")
         if option.runappdirect:
             import sys
             if '__pypy__' not in sys.builtin_module_names:
diff --git a/pypy/objspace/std/test/test_memoryobject.py 
b/pypy/objspace/std/test/test_memoryobject.py
--- a/pypy/objspace/std/test/test_memoryobject.py
+++ b/pypy/objspace/std/test/test_memoryobject.py
@@ -166,7 +166,12 @@
     def test_hex(self):
         assert memoryview(b"abc").hex() == u'616263'
 
-    @py.test.skip("needs numpy ndarray")
+from pypy.module.micronumpy.test.test_base import BaseNumpyAppTest
+
+class AppTestMemoryViewMicroNumPyPy(BaseNumpyAppTest):
+    spaceconfig = dict(usemodules=['array', 'micronumpy'])
+
     def test_tuple_indexing(self):
+        from numpy import ndarray
         content = ndarray(list(range(12)))
         assert memoryview(content)[0,0] == 0
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to