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

Method test_special_chars_full

testing/test_assertion.py:1050–1060  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1048
1049class TestFormatExplanation:
1050 def test_special_chars_full(self, pytester: Pytester) -> None:
1051 # Issue 453, for the bug this would raise IndexError
1052 pytester.makepyfile(
1053 """
1054 def test_foo():
1055 assert '\\n}' == ''
1056 """
1057 )
1058 result = pytester.runpytest()
1059 assert result.ret == 1
1060 result.stdout.fnmatch_lines(["*AssertionError*"])
1061
1062 def test_fmt_simple(self) -> None:
1063 expl = "assert foo"

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected