diff --git a/tests/backport_assert_raises.py b/tests/backport_assert_raises.py index 75f9f342e..6ceacaa89 100644 --- a/tests/backport_assert_raises.py +++ b/tests/backport_assert_raises.py @@ -27,6 +27,8 @@ except TypeError: def __exit__(self, exc_type, exc_val, tb): self.exception = exc_val + if issubclass(exc_type, self.expected): + return True nose.tools.assert_equal(exc_type, self.expected) # if you get to this line, the last assertion must have passed # suppress the propagation of this exception