Skip to content

Commit d528b9d

Browse files
committed
Use issubclass()
1 parent a71fe0e commit d528b9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_asserts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def __enter__(self):
8080
def __exit__(self, exc_type, exc_val, exc_tb):
8181
if exc_type is None:
8282
raise AssertionError("no AssertionError raised")
83-
if exc_type != AssertionError:
83+
if not issubclass(exc_type, AssertionError):
8484
return False
8585
if str(exc_val) != expected_message:
8686
raise AssertionError(

0 commit comments

Comments
 (0)