Skip to content

Commit 7dbc2b9

Browse files
committed
Mark tests that currently fail on GraalPy with xfail
1 parent c1fd3c9 commit 7dbc2b9

5 files changed

+13
-0
lines changed

tests/test_cpp_conduit.py

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import home_planet_very_lonely_traveler
88
import pytest
99

10+
import env # noqa: F401
1011
from pybind11_tests import cpp_conduit as home_planet
1112

1213

@@ -20,6 +21,7 @@ def test_premium_traveler_getattr_actually_exists():
2021
assert t_h.secret_name == "PremiumTraveler GetAttr: secret_name points: 7"
2122

2223

24+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
2325
def test_call_cpp_conduit_success():
2426
t_h = home_planet.Traveler("home")
2527
cap = t_h._pybind11_conduit_v1_(

tests/test_enum.py

+3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33

44
import pytest
55

6+
import env # noqa: F401
67
from pybind11_tests import enums as m
78

89

10+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
911
def test_unscoped_enum():
1012
assert str(m.UnscopedEnum.EOne) == "UnscopedEnum.EOne"
1113
assert str(m.UnscopedEnum.ETwo) == "UnscopedEnum.ETwo"
@@ -193,6 +195,7 @@ def test_implicit_conversion():
193195
assert repr(x) == "{<EMode.EFirstMode: 1>: 3, <EMode.ESecondMode: 2>: 4}"
194196

195197

198+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
196199
def test_binary_operators():
197200
assert int(m.Flags.Read) == 4
198201
assert int(m.Flags.Write) == 2

tests/test_exceptions.py

+3
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def test_custom(msg):
201201
assert msg(excinfo.value) == "[PythonMyException7]: abc"
202202

203203

204+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
204205
def test_nested_throws(capture):
205206
"""Tests nested (e.g. C++ -> Python -> C++) exception handling"""
206207

@@ -369,13 +370,15 @@ def _test_flaky_exception_failure_point_init_py_3_12():
369370
"env.PYPY and sys.version_info[:2] < (3, 12)",
370371
reason="PyErr_NormalizeException Segmentation fault",
371372
)
373+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
372374
def test_flaky_exception_failure_point_init():
373375
if sys.version_info[:2] < (3, 12):
374376
_test_flaky_exception_failure_point_init_before_py_3_12()
375377
else:
376378
_test_flaky_exception_failure_point_init_py_3_12()
377379

378380

381+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
379382
def test_flaky_exception_failure_point_str():
380383
what, py_err_set_after_what = m.error_already_set_what(
381384
FlakyException, ("failure_point_str",)

tests/test_operator_overloading.py

+3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
import pytest
44

5+
import env # noqa: F401
56
from pybind11_tests import ConstructorStats
67
from pybind11_tests import operators as m
78

89

10+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
911
def test_operator_overloading():
1012
v1 = m.Vector2(1, 2)
1113
v2 = m.Vector(3, -1)
@@ -83,6 +85,7 @@ def test_operator_overloading():
8385
assert cstats.move_assignments == 0
8486

8587

88+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
8689
def test_operators_notimplemented():
8790
"""#393: need to return NotSupported to ensure correct arithmetic operator behavior"""
8891

tests/test_pytypes.py

+2
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ def __repr__(self):
262262
m.str_from_std_string_input,
263263
],
264264
)
265+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
265266
def test_surrogate_pairs_unicode_error(func):
266267
input_str = "\ud83d\ude4f".encode("utf-8", "surrogatepass")
267268
with pytest.raises(UnicodeDecodeError):
@@ -420,6 +421,7 @@ def test_accessor_moves():
420421
pytest.skip("Not defined: PYBIND11_HANDLE_REF_DEBUG")
421422

422423

424+
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
423425
def test_constructors():
424426
"""C++ default and converting constructors are equivalent to type calls in Python"""
425427
types = [bytes, bytearray, str, bool, int, float, tuple, list, dict, set]

0 commit comments

Comments
 (0)