Skip to content

Commit 2ea2221

Browse files
committed
Cover assertions with messages when enable_assertion_pass_hook is enabled
1 parent 629eb3e commit 2ea2221

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

testing/test_assertrewrite.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,10 @@ def test_simple():
13631363
d=0
13641364
13651365
assert a+b == c+d
1366+
1367+
# cover failing assertions with a message
1368+
def test_fails():
1369+
assert False, "assert with message"
13661370
"""
13671371
)
13681372
result = testdir.runpytest()

0 commit comments

Comments
 (0)