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

Method test_summary_f_alias

testing/test_terminal.py:1053–1064  ·  view source on GitHub ↗

Test that 'f' and 'F' report chars are aliases and don't show up twice in the summary (#6334)

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1051 result.stdout.fnmatch_lines(["collected 3 items", "hello from hook: 3 items"])
1052
1053 def test_summary_f_alias(self, pytester: Pytester) -> None:
1054 """Test that 'f' and 'F' report chars are aliases and don't show up twice in the summary (#6334)"""
1055 pytester.makepyfile(
1056 """
1057 def test():
1058 assert False
1059 """
1060 )
1061 result = pytester.runpytest("-rfF")
1062 expected = "FAILED test_summary_f_alias.py::test - assert False"
1063 result.stdout.fnmatch_lines([expected])
1064 assert result.stdout.lines.count(expected) == 1
1065
1066 def test_summary_s_alias(self, pytester: Pytester) -> None:
1067 """Test that 's' and 'S' report chars are aliases and don't show up twice in the summary"""

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
countMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected