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

Function test_diff_newline_at_end

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

Source from the content-addressed store, hash-verified

1538
1539
1540def test_diff_newline_at_end(pytester: Pytester) -> None:
1541 pytester.makepyfile(
1542 r"""
1543 def test_diff():
1544 assert 'asdf' == 'asdf\n'
1545 """
1546 )
1547
1548 result = pytester.runpytest()
1549 result.stdout.fnmatch_lines(
1550 r"""
1551 *assert 'asdf' == 'asdf\n'
1552 * - asdf
1553 * ? -
1554 * + asdf
1555 """
1556 )
1557
1558
1559@pytest.mark.filterwarnings("default")

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected