mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 14:59:27 +00:00
Add error_scope to py::class_::dealloc() to protect destructor calls (#2342)
Fixes issue #1878
This commit is contained in:
@@ -323,3 +323,9 @@ def test_non_final_final():
|
||||
class PyNonFinalFinalChild(m.IsNonFinalFinal):
|
||||
pass
|
||||
assert str(exc_info.value).endswith("is not an acceptable base type")
|
||||
|
||||
|
||||
# https://github.com/pybind/pybind11/issues/1878
|
||||
def test_exception_rvalue_abort():
|
||||
with pytest.raises(RuntimeError):
|
||||
m.PyPrintDestructor().throw_something()
|
||||
|
||||
Reference in New Issue
Block a user