[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
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py
index 8d37c09..6edff9f 100644
--- a/tests/test_exceptions.py
+++ b/tests/test_exceptions.py
@@ -48,7 +48,9 @@
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):