Skip to content

Commit 6079989

Browse files
mattiprwgk
andauthored
Pypy testing no longer xfails (#6077)
* test passes on PyPy macOS * adjust tests for pypy HEAD * fixes from review * pypy 7.3.23 was released, drop some PyPy testing * pin to pypy version 7.3.23 * Restore xfail for cross-module translator platforms Keep the expected failure for Android and FreeBSD while limiting the PyPy-specific part to versions before 7.3.23. Android CIBW still raises RuntimeError for this test, matching the existing tracked platform issue. --------- Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
1 parent 46ebf50 commit 6079989

5 files changed

Lines changed: 9 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ jobs:
4848
python-version: '3.14t'
4949
cmake-args: -DCMAKE_CXX_STANDARD=17 -DPYBIND11_TEST_SMART_HOLDER=ON
5050
- runs-on: ubuntu-latest
51-
# Temporarily pinned pending investigation in issue #6049.
52-
python-version: 'pypy-3.11-v7.3.21'
51+
python-version: 'pypy-3.11-v7.3.23'
5352
cmake-args: -DCMAKE_CXX_STANDARD=17
5453
- runs-on: ubuntu-latest
5554
python-version: 'graalpy-24.2'
@@ -94,7 +93,7 @@ jobs:
9493
python-version: '3.14'
9594
cmake-args: -DCMAKE_CXX_STANDARD=14
9695
- runs-on: ubuntu-latest
97-
python-version: 'pypy-3.10'
96+
python-version: 'pypy-3.11-v7.3.23'
9897
cmake-args: -DCMAKE_CXX_STANDARD=14
9998
- runs-on: ubuntu-latest
10099
python-version: 'graalpy-24.1'
@@ -115,12 +114,8 @@ jobs:
115114
- runs-on: macos-latest
116115
python-version: '3.14t'
117116
cmake-args: -DCMAKE_CXX_STANDARD=20
118-
- runs-on: macos-15-intel
119-
python-version: 'pypy-3.10'
120-
cmake-args: -DCMAKE_CXX_STANDARD=17
121117
- runs-on: macos-latest
122-
# Temporarily pinned pending investigation in issue #6049.
123-
python-version: 'pypy-3.11-v7.3.21'
118+
python-version: 'pypy-3.11-v7.3.23'
124119
- runs-on: macos-latest
125120
python-version: 'graalpy-24.2'
126121

@@ -150,11 +145,7 @@ jobs:
150145
python-version: '3.14t'
151146
cmake-args: -DCMAKE_CXX_STANDARD=23
152147
- runs-on: windows-latest
153-
python-version: 'pypy-3.10'
154-
cmake-args: -DCMAKE_CXX_STANDARD=17
155-
- runs-on: windows-latest
156-
# Temporarily pinned pending investigation in issue #6049.
157-
python-version: 'pypy3.11-v7.3.21'
148+
python-version: 'pypy3.11'
158149
cmake-args: -DCMAKE_CXX_STANDARD=20
159150
# The setup-python action currently doesn't have graalpy for windows
160151
# See https://github.com/actions/setup-python/pull/880

tests/env.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def _is_musl() -> bool:
2727

2828
CPYTHON = platform.python_implementation() == "CPython"
2929
PYPY = platform.python_implementation() == "PyPy"
30+
PYPY_PRE_7_3_23 = PYPY and sys.pypy_version_info < (7, 3, 23)
3031
GRAALPY = sys.implementation.name == "graalpy"
3132
_graalpy_version = (
3233
sys.modules["__graalpython__"].get_graalvm_version() if GRAALPY else "0.0.0"

tests/test_class_sh_disowning_mi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __init__(self, i):
145145
MI6.__init__(self, i)
146146

147147

148-
@pytest.mark.xfail("env.PYPY")
148+
@pytest.mark.xfail("env.PYPY_PRE_7_3_23")
149149
def test_multiple_inheritance_python():
150150
# Based on test_multiple_inheritance.py:test_multiple_inheritance_python.
151151
# Exercises values_and_holders with 2 value_and_holder instances.

tests/test_exceptions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,10 @@ def test_cross_module_exceptions(msg):
7474
assert str(excinfo.value) == "'just local'"
7575

7676

77-
# TODO: FIXME
7877
@pytest.mark.xfail(
79-
"(env.MACOS and env.PYPY) or env.ANDROID or env.FREEBSD",
78+
"(env.MACOS and env.PYPY_PRE_7_3_23) or env.ANDROID or env.FREEBSD",
8079
raises=RuntimeError,
8180
reason="See Issue #2847, PR #2999, PR #4324, PR #5925",
82-
strict=not env.PYPY, # PR 5569
8381
)
8482
def test_cross_module_exception_translator():
8583
with pytest.raises(KeyError):

tests/test_multiple_inheritance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_multiple_inheritance_cpp():
1414
assert mt.bar() == 4
1515

1616

17-
@pytest.mark.xfail("env.PYPY")
17+
@pytest.mark.xfail("env.PYPY_PRE_7_3_23")
1818
def test_multiple_inheritance_mix1():
1919
class Base1:
2020
def __init__(self, i):
@@ -53,7 +53,7 @@ def __init__(self, i, j):
5353
assert mt.bar() == 4
5454

5555

56-
@pytest.mark.xfail("env.PYPY")
56+
@pytest.mark.xfail("env.PYPY_PRE_7_3_23")
5757
def test_multiple_inheritance_python():
5858
class MI1(m.Base1, m.Base2):
5959
def __init__(self, i, j):

0 commit comments

Comments
 (0)