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
# an actual bug but one I can't easily resolve
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
memoryview.numpy_memoryview
# 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
......@@ -2,17 +2,15 @@
# either in PyPy, PyPy's cpyext, or Cython under PyPy,
# which will be skipped in the normal testing run.
broken_exception
bufaccess
memoryview.memoryview$
sequential_parallel
yield_from_pep380
memoryview_inplace_division
run.unicodemethods
# looks like a doctest issue? It's failing to match output that looks
# identical to my eye
#run.unicodemethods
# multiphase import not supported
run.unicode_imports
run.test_genericclass
run.tp_new
run.test_fstring
run.test_exceptions
......@@ -22,12 +20,10 @@ run.special_method_docstrings
run.slice_ptr
compile.min_async
run.cython_includes
run.pyarray
run.test_unicode
run.__getattribute__
run.__getattribute_subclasses__
run.__debug__
run.array_cimport
run.builtin_abs
run.builtincomplex
run.cdef_multiple_inheritance_errors
......
......@@ -10,6 +10,7 @@ double_dealloc_T796
run.exceptionrefcount
run.capiimpl
run.refcount_in_meth
sequential_parallel
# Ideally just disable the reference-counting tests on PyPy?
run.fused_types
run.generator_frame_cycle
......@@ -41,5 +42,7 @@ memoryview.memoryview_pep484_typing
run.cpp_classes
run.cpp_classes_def
# missing pypy feature?
matrix_multiplier
# relies on cimport array (which has a different structure in PyPy)
memoryview_inplace_division
run.pyarray
run.array_cimport
......@@ -22,9 +22,11 @@ ExtMatMult("ExtMatMult('ExtMatMult(1) @ ExtMatMult(2)') @ ExtMatMult(2)")
>>> x @ y
Traceback (most recent call last):
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):
TypeError: unsupported operand type(s) for @=: 'int' and 'int'
TypeError: unsupported operand type(s) for @...: 'int' and 'int'
>>> y = MatMult(22)
>>> x @= y
......@@ -112,9 +114,9 @@ def test_imatmul(a, b):
>>> print(test_imatmul(MatMult('abc'), 11))
MatMult("MatMult('abc') @ 11")
>>> test_imatmul(1, 2)
>>> test_imatmul(1, 2) # doctest: +ELLIPSIS
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
return a
......@@ -162,7 +162,8 @@ class TestClassGetitem(unittest.TestCase):
# BEGIN - Additional tests from cython
def test_no_class_getitem(self):
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]
# END - Additional tests from cython
......
......@@ -51,7 +51,8 @@ cdef class Invalid4:
class TestClassGetitem(unittest.TestCase):
# BEGIN - Additional tests from cython
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]
# END - Additional tests from cython
......
......@@ -513,7 +513,9 @@ def mod_format(unicode s, values):
True
>>> mod_format(format2, ('XYZ', 'ABC')) == 'abcXYZdefABCghi' or mod_format(format2, ('XYZ', 'ABC'))
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):
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
>>> 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