mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Replace "Unknown internal error occurred" with a more helpful message. (#3982)
This commit is contained in:
committed by
GitHub
parent
de4ba92c9f
commit
b24c5ed204
@@ -16,7 +16,10 @@ def test_std_exception(msg):
|
||||
def test_error_already_set(msg):
|
||||
with pytest.raises(RuntimeError) as excinfo:
|
||||
m.throw_already_set(False)
|
||||
assert msg(excinfo.value) == "Unknown internal error occurred"
|
||||
assert (
|
||||
msg(excinfo.value)
|
||||
== "Internal error: pybind11::error_already_set called while Python error indicator not set."
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError) as excinfo:
|
||||
m.throw_already_set(True)
|
||||
|
||||
Reference in New Issue
Block a user