diff --git a/numpy/typing/tests/test_generic_alias.py b/numpy/typing/tests/test_generic_alias.py index e9a0a07ecdb5..52d3deae4ed2 100644 --- a/numpy/typing/tests/test_generic_alias.py +++ b/numpy/typing/tests/test_generic_alias.py @@ -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] @@ -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 @@ -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)