MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_AssertionError_message

Function test_AssertionError_message

testing/test_assertion.py:1522–1537  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1520
1521
1522def test_AssertionError_message(pytester: Pytester) -> None:
1523 pytester.makepyfile(
1524 """
1525 def test_hello():
1526 x,y = 1,2
1527 assert 0, (x,y)
1528 """
1529 )
1530 result = pytester.runpytest()
1531 result.stdout.fnmatch_lines(
1532 """
1533 *def test_hello*
1534 *assert 0, (x,y)*
1535 *AssertionError: (1, 2)*
1536 """
1537 )
1538
1539
1540def test_diff_newline_at_end(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected