Skip to content

Commit

Permalink
Fix mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Jun 25, 2021
1 parent 57ef2e1 commit c911658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ward/expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __exit__(
exc_val: Optional[BaseException],
exc_tb: Optional[types.TracebackType],
) -> bool:
if not issubclass(exc_type, self.expected_ex_type):
if exc_type and not issubclass(exc_type, self.expected_ex_type):
raise AssertionError(
f"Expected exception {self.expected_ex_type}, but {exc_type} was raised instead."
)
Expand Down

0 comments on commit c911658

Please sign in to comment.