mirror of https://github.com/pybind/pybind11.git
Mark tests that currently fail on GraalPy with xfail
This commit is contained in:
parent
a00b51e250
commit
61a0f8ed86
|
@ -7,6 +7,7 @@ import exo_planet_pybind11
|
|||
import home_planet_very_lonely_traveler
|
||||
import pytest
|
||||
|
||||
import env # noqa: F401
|
||||
from pybind11_tests import cpp_conduit as home_planet
|
||||
|
||||
|
||||
|
@ -20,6 +21,7 @@ def test_premium_traveler_getattr_actually_exists():
|
|||
assert t_h.secret_name == "PremiumTraveler GetAttr: secret_name points: 7"
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
|
||||
def test_call_cpp_conduit_success():
|
||||
t_h = home_planet.Traveler("home")
|
||||
cap = t_h._pybind11_conduit_v1_(
|
||||
|
|
|
@ -3,9 +3,11 @@ from __future__ import annotations
|
|||
|
||||
import pytest
|
||||
|
||||
import env # noqa: F401
|
||||
from pybind11_tests import enums as m
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
|
||||
def test_unscoped_enum():
|
||||
assert str(m.UnscopedEnum.EOne) == "UnscopedEnum.EOne"
|
||||
assert str(m.UnscopedEnum.ETwo) == "UnscopedEnum.ETwo"
|
||||
|
@ -193,6 +195,7 @@ def test_implicit_conversion():
|
|||
assert repr(x) == "{<EMode.EFirstMode: 1>: 3, <EMode.ESecondMode: 2>: 4}"
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
|
||||
def test_binary_operators():
|
||||
assert int(m.Flags.Read) == 4
|
||||
assert int(m.Flags.Write) == 2
|
||||
|
|
|
@ -201,6 +201,7 @@ def test_custom(msg):
|
|||
assert msg(excinfo.value) == "[PythonMyException7]: abc"
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
|
||||
def test_nested_throws(capture):
|
||||
"""Tests nested (e.g. C++ -> Python -> C++) exception handling"""
|
||||
|
||||
|
@ -369,6 +370,7 @@ def _test_flaky_exception_failure_point_init_py_3_12():
|
|||
"env.PYPY and sys.version_info[:2] < (3, 12)",
|
||||
reason="PyErr_NormalizeException Segmentation fault",
|
||||
)
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
|
||||
def test_flaky_exception_failure_point_init():
|
||||
if sys.version_info[:2] < (3, 12):
|
||||
_test_flaky_exception_failure_point_init_before_py_3_12()
|
||||
|
@ -376,6 +378,7 @@ def test_flaky_exception_failure_point_init():
|
|||
_test_flaky_exception_failure_point_init_py_3_12()
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
|
||||
def test_flaky_exception_failure_point_str():
|
||||
what, py_err_set_after_what = m.error_already_set_what(
|
||||
FlakyException, ("failure_point_str",)
|
||||
|
|
|
@ -211,6 +211,11 @@ def _run_in_threads(test_fn, num_threads, parallel):
|
|||
|
||||
@pytest.mark.skipif(sys.platform.startswith("emscripten"), reason="Requires threads")
|
||||
@pytest.mark.parametrize("test_fn", ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK)
|
||||
@pytest.mark.xfail(
|
||||
"env.GRAALPY",
|
||||
reason="GraalPy transiently complains about unfinished threads at process exit",
|
||||
strict=False,
|
||||
)
|
||||
def test_run_in_process_one_thread(test_fn):
|
||||
"""Makes sure there is no GIL deadlock when running in a thread.
|
||||
|
||||
|
@ -221,6 +226,11 @@ def test_run_in_process_one_thread(test_fn):
|
|||
|
||||
@pytest.mark.skipif(sys.platform.startswith("emscripten"), reason="Requires threads")
|
||||
@pytest.mark.parametrize("test_fn", ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK)
|
||||
@pytest.mark.xfail(
|
||||
"env.GRAALPY",
|
||||
reason="GraalPy transiently complains about unfinished threads at process exit",
|
||||
strict=False,
|
||||
)
|
||||
def test_run_in_process_multiple_threads_parallel(test_fn):
|
||||
"""Makes sure there is no GIL deadlock when running in a thread multiple times in parallel.
|
||||
|
||||
|
@ -231,6 +241,11 @@ def test_run_in_process_multiple_threads_parallel(test_fn):
|
|||
|
||||
@pytest.mark.skipif(sys.platform.startswith("emscripten"), reason="Requires threads")
|
||||
@pytest.mark.parametrize("test_fn", ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK)
|
||||
@pytest.mark.xfail(
|
||||
"env.GRAALPY",
|
||||
reason="GraalPy transiently complains about unfinished threads at process exit",
|
||||
strict=False,
|
||||
)
|
||||
def test_run_in_process_multiple_threads_sequential(test_fn):
|
||||
"""Makes sure there is no GIL deadlock when running in a thread multiple times sequentially.
|
||||
|
||||
|
@ -241,6 +256,11 @@ def test_run_in_process_multiple_threads_sequential(test_fn):
|
|||
|
||||
@pytest.mark.skipif(sys.platform.startswith("emscripten"), reason="Requires threads")
|
||||
@pytest.mark.parametrize("test_fn", ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK)
|
||||
@pytest.mark.xfail(
|
||||
"env.GRAALPY",
|
||||
reason="GraalPy transiently complains about unfinished threads at process exit",
|
||||
strict=False,
|
||||
)
|
||||
def test_run_in_process_direct(test_fn):
|
||||
"""Makes sure there is no GIL deadlock when using processes.
|
||||
|
||||
|
|
|
@ -2,10 +2,12 @@ from __future__ import annotations
|
|||
|
||||
import pytest
|
||||
|
||||
import env # noqa: F401
|
||||
from pybind11_tests import ConstructorStats
|
||||
from pybind11_tests import operators as m
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
|
||||
def test_operator_overloading():
|
||||
v1 = m.Vector2(1, 2)
|
||||
v2 = m.Vector(3, -1)
|
||||
|
@ -83,6 +85,7 @@ def test_operator_overloading():
|
|||
assert cstats.move_assignments == 0
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should get fixed on GraalPy side")
|
||||
def test_operators_notimplemented():
|
||||
"""#393: need to return NotSupported to ensure correct arithmetic operator behavior"""
|
||||
|
||||
|
|
|
@ -262,6 +262,7 @@ def test_str(doc):
|
|||
m.str_from_std_string_input,
|
||||
],
|
||||
)
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
|
||||
def test_surrogate_pairs_unicode_error(func):
|
||||
input_str = "\ud83d\ude4f".encode("utf-8", "surrogatepass")
|
||||
with pytest.raises(UnicodeDecodeError):
|
||||
|
@ -420,6 +421,7 @@ def test_accessor_moves():
|
|||
pytest.skip("Not defined: PYBIND11_HANDLE_REF_DEBUG")
|
||||
|
||||
|
||||
@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
|
||||
def test_constructors():
|
||||
"""C++ default and converting constructors are equivalent to type calls in Python"""
|
||||
types = [bytes, bytearray, str, bool, int, float, tuple, list, dict, set]
|
||||
|
|
Loading…
Reference in New Issue