Skip to content

Commit

Permalink
Revert "skip parts of generic_alias test on PyPy3.9-v7.3.9"
Browse files Browse the repository at this point in the history
This reverts commit 0fea286.
  • Loading branch information
lithomas1 committed Apr 16, 2022
1 parent 1b364cc commit b89e9b5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions numpy/typing/tests/test_generic_alias.py
Expand Up @@ -17,10 +17,7 @@
DType = _GenericAlias(np.dtype, (ScalarType,))
NDArray = _GenericAlias(np.ndarray, (Any, DType))

_SKIP_PYPY_39 = (sys.implementation.name == 'pypy' and
sys.implementation.version < (7, 3, 10))

if sys.version_info >= (3, 9) and not _SKIP_PYPY_39:
if sys.version_info >= (3, 9):
DType_ref = types.GenericAlias(np.dtype, (ScalarType,))
NDArray_ref = types.GenericAlias(np.ndarray, (Any, DType_ref))
FuncType = Callable[[Union[_GenericAlias, types.GenericAlias]], Any]
Expand Down Expand Up @@ -80,7 +77,7 @@ def test_pass(self, name: str, func: FuncType) -> None:
"""
value = func(NDArray)

if sys.version_info >= (3, 9) and not _SKIP_PYPY_39:
if sys.version_info >= (3, 9):
value_ref = func(NDArray_ref)
assert value == value_ref

Expand Down Expand Up @@ -142,6 +139,6 @@ def test_raise(
with pytest.raises(exc_type):
func(NDArray)

if sys.version_info >= (3, 9) and not _SKIP_PYPY_39:
if sys.version_info >= (3, 9):
with pytest.raises(exc_type):
func(NDArray_ref)

0 comments on commit b89e9b5

Please sign in to comment.