[BUGFIX] Fixing pybind11::error_already_set.matches to also work with exception subclasses (#1715)

* Fixing order of arguments in call to PyErr_GivenExceptionMatches in pybind11::error_already_set.matches

* Added tests on error_already_set::matches fix for exception base classes
This commit is contained in:
Yannick Jadoul
2019-05-12 23:35:49 +02:00
committed by Wenzel Jakob
parent a0b8f70df4
commit 97784dad3e
3 changed files with 33 additions and 3 deletions

View File

@@ -48,7 +48,9 @@ def test_python_call_in_catch():
def test_exception_matches():
m.exception_matches()
assert m.exception_matches()
assert m.exception_matches_base()
assert m.modulenotfound_exception_matches_base()
def test_custom(msg):