Commit 93e35ea1 authored by da-woods's avatar da-woods Committed by GitHub

Recategorize a few pypy bugs, fix some others (GH-4485)

"Fixes" a few bugs that are just caused by very small implementation
details, recategorize some others (e.g. those that cimport array
are not expected to ever work)
parent 43fbed5c
...@@ -20,10 +20,14 @@ run.pure_pxd ...@@ -20,10 +20,14 @@ run.pure_pxd
# an actual bug but one I can't easily resolve # an actual bug but one I can't easily resolve
run.with_gil run.with_gil
# moved from "pypy_bugs" - work on Pypy3, segfault on pypy2
broken_exception
yield_from_pep380
# looks like a "when does the GC run?" issue - slightly surprised it's OK on pypy3 # looks like a "when does the GC run?" issue - slightly surprised it's OK on pypy3
memoryview.numpy_memoryview memoryview.numpy_memoryview
# type features that are disabled in PyPy2: # type features that are disabled in PyPy2:
#run.test_genericclass # (the overridden __Pyx_PyObject_GetItem requires CYTHON_USE_TYPE_SLOTS)
run.test_genericclass
run.test_subclassinit run.test_subclassinit
...@@ -2,17 +2,15 @@ ...@@ -2,17 +2,15 @@
# either in PyPy, PyPy's cpyext, or Cython under PyPy, # either in PyPy, PyPy's cpyext, or Cython under PyPy,
# which will be skipped in the normal testing run. # which will be skipped in the normal testing run.
broken_exception
bufaccess bufaccess
memoryview.memoryview$ memoryview.memoryview$
sequential_parallel
yield_from_pep380 # looks like a doctest issue? It's failing to match output that looks
memoryview_inplace_division # identical to my eye
#run.unicodemethods
run.unicodemethods # multiphase import not supported
run.unicode_imports run.unicode_imports
run.test_genericclass
run.tp_new run.tp_new
run.test_fstring run.test_fstring
run.test_exceptions run.test_exceptions
...@@ -22,12 +20,10 @@ run.special_method_docstrings ...@@ -22,12 +20,10 @@ run.special_method_docstrings
run.slice_ptr run.slice_ptr
compile.min_async compile.min_async
run.cython_includes run.cython_includes
run.pyarray
run.test_unicode run.test_unicode
run.__getattribute__ run.__getattribute__
run.__getattribute_subclasses__ run.__getattribute_subclasses__
run.__debug__ run.__debug__
run.array_cimport
run.builtin_abs run.builtin_abs
run.builtincomplex run.builtincomplex
run.cdef_multiple_inheritance_errors run.cdef_multiple_inheritance_errors
......
...@@ -10,6 +10,7 @@ double_dealloc_T796 ...@@ -10,6 +10,7 @@ double_dealloc_T796
run.exceptionrefcount run.exceptionrefcount
run.capiimpl run.capiimpl
run.refcount_in_meth run.refcount_in_meth
sequential_parallel
# Ideally just disable the reference-counting tests on PyPy? # Ideally just disable the reference-counting tests on PyPy?
run.fused_types run.fused_types
run.generator_frame_cycle run.generator_frame_cycle
...@@ -41,5 +42,7 @@ memoryview.memoryview_pep484_typing ...@@ -41,5 +42,7 @@ memoryview.memoryview_pep484_typing
run.cpp_classes run.cpp_classes
run.cpp_classes_def run.cpp_classes_def
# missing pypy feature? # relies on cimport array (which has a different structure in PyPy)
matrix_multiplier memoryview_inplace_division
run.pyarray
run.array_cimport
...@@ -22,9 +22,11 @@ ExtMatMult("ExtMatMult('ExtMatMult(1) @ ExtMatMult(2)') @ ExtMatMult(2)") ...@@ -22,9 +22,11 @@ ExtMatMult("ExtMatMult('ExtMatMult(1) @ ExtMatMult(2)') @ ExtMatMult(2)")
>>> x @ y >>> x @ y
Traceback (most recent call last): Traceback (most recent call last):
TypeError: unsupported operand type(s) for @: 'int' and 'int' TypeError: unsupported operand type(s) for @: 'int' and 'int'
>>> x @= y
PyPy exception message has '@' rather than '@='
>>> x @= y # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: unsupported operand type(s) for @=: 'int' and 'int' TypeError: unsupported operand type(s) for @...: 'int' and 'int'
>>> y = MatMult(22) >>> y = MatMult(22)
>>> x @= y >>> x @= y
...@@ -112,9 +114,9 @@ def test_imatmul(a, b): ...@@ -112,9 +114,9 @@ def test_imatmul(a, b):
>>> print(test_imatmul(MatMult('abc'), 11)) >>> print(test_imatmul(MatMult('abc'), 11))
MatMult("MatMult('abc') @ 11") MatMult("MatMult('abc') @ 11")
>>> test_imatmul(1, 2) >>> test_imatmul(1, 2) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: unsupported operand type(s) for @=: 'int' and 'int' TypeError: unsupported operand type(s) for @...: 'int' and 'int'
""" """
a @= b a @= b
return a return a
...@@ -162,7 +162,8 @@ class TestClassGetitem(unittest.TestCase): ...@@ -162,7 +162,8 @@ class TestClassGetitem(unittest.TestCase):
# BEGIN - Additional tests from cython # BEGIN - Additional tests from cython
def test_no_class_getitem(self): def test_no_class_getitem(self):
class C: ... class C: ...
with self.assertRaises(TypeError): # note that PyPy raises AttributeError on __class_getitem__
with self.assertRaises(TypeError if not hasattr(sys, "pypy_version_info") else AttributeError):
C[int] C[int]
# END - Additional tests from cython # END - Additional tests from cython
......
...@@ -51,7 +51,8 @@ cdef class Invalid4: ...@@ -51,7 +51,8 @@ cdef class Invalid4:
class TestClassGetitem(unittest.TestCase): class TestClassGetitem(unittest.TestCase):
# BEGIN - Additional tests from cython # BEGIN - Additional tests from cython
def test_no_class_getitem(self): def test_no_class_getitem(self):
with self.assertRaises(TypeError): # note that PyPy raises AttributeError on __class_getitem__
with self.assertRaises(TypeError if not hasattr(sys, "pypy_version_info") else AttributeError):
UnSupport[int] UnSupport[int]
# END - Additional tests from cython # END - Additional tests from cython
......
...@@ -513,7 +513,9 @@ def mod_format(unicode s, values): ...@@ -513,7 +513,9 @@ def mod_format(unicode s, values):
True True
>>> mod_format(format2, ('XYZ', 'ABC')) == 'abcXYZdefABCghi' or mod_format(format2, ('XYZ', 'ABC')) >>> mod_format(format2, ('XYZ', 'ABC')) == 'abcXYZdefABCghi' or mod_format(format2, ('XYZ', 'ABC'))
True True
>>> mod_format(None, 'sa') # doctest: +ELLIPSIS
Exact TypeError message is different in PyPy
>>> mod_format(None, 'sa') # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last): Traceback (most recent call last):
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str' TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
>>> class RMod(object): >>> class RMod(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment