MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_flaky_exception_failure_point_str

Function test_flaky_exception_failure_point_str

tests/test_exceptions.py:383–399  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381
382@pytest.mark.xfail("env.GRAALPY", reason="TODO should be fixed on GraalPy side")
383def test_flaky_exception_failure_point_str():
384 what, py_err_set_after_what = m.error_already_set_what(
385 FlakyException, ("failure_point_str",)
386 )
387 assert not py_err_set_after_what
388 lines = what.splitlines()
389 n = 3 if env.PYPY and len(lines) == 3 else 5
390 assert (
391 lines[:n]
392 == [
393 "FlakyException: <MESSAGE UNAVAILABLE DUE TO ANOTHER EXCEPTION>",
394 "",
395 "MESSAGE UNAVAILABLE DUE TO EXCEPTION: ValueError: triggered_failure_point_str",
396 "",
397 "At:",
398 ][:n]
399 )
400
401
402def test_cross_module_interleaved_error_already_set():

Callers

nothing calls this directly

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected