mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Add error_scope to detail::get_internals() (#3981)
* Add `error_scope` to `detail::get_internals()` * Adjust test to tolerate macOS PyPy behavior.
This commit is contained in:
committed by
GitHub
parent
8da58da539
commit
de4ba92c9f
@@ -320,3 +320,12 @@ def test_flaky_exception_failure_point_str():
|
||||
with pytest.raises(ValueError) as excinfo:
|
||||
m.error_already_set_what(FlakyException, ("failure_point_str",))
|
||||
assert str(excinfo.value) == "triggered_failure_point_str"
|
||||
|
||||
|
||||
def test_cross_module_interleaved_error_already_set():
|
||||
with pytest.raises(RuntimeError) as excinfo:
|
||||
m.test_cross_module_interleaved_error_already_set()
|
||||
assert str(excinfo.value) in (
|
||||
"2nd error.", # Almost all platforms.
|
||||
"RuntimeError: 2nd error.", # Some PyPy builds (seen under macOS).
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user