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

Method test_summary_s_alias

testing/test_terminal.py:1066–1080  ·  view source on GitHub ↗

Test that 's' and 'S' report chars are aliases and don't show up twice in the summary

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

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"""
1068 pytester.makepyfile(
1069 """
1070 import pytest
1071
1072 @pytest.mark.skip
1073 def test():
1074 pass
1075 """
1076 )
1077 result = pytester.runpytest("-rsS")
1078 expected = "SKIPPED [1] test_summary_s_alias.py:3: unconditional skip"
1079 result.stdout.fnmatch_lines([expected])
1080 assert result.stdout.lines.count(expected) == 1
1081
1082
1083def test_fail_extra_reporting(pytester: Pytester, monkeypatch) -> None:

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