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

Function test_reportchars_all

testing/test_skipping.py:1078–1108  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1076
1077
1078def test_reportchars_all(pytester: Pytester) -> None:
1079 pytester.makepyfile(
1080 """
1081 import pytest
1082 def test_1():
1083 assert 0
1084 @pytest.mark.xfail
1085 def test_2():
1086 assert 0
1087 @pytest.mark.xfail
1088 def test_3():
1089 pass
1090 def test_4():
1091 pytest.skip("four")
1092 @pytest.fixture
1093 def fail():
1094 assert 0
1095 def test_5(fail):
1096 pass
1097 """
1098 )
1099 result = pytester.runpytest("-ra")
1100 result.stdout.fnmatch_lines(
1101 [
1102 "SKIP*four*",
1103 "XFAIL*test_2*",
1104 "XPASS*test_3*",
1105 "ERROR*test_5*",
1106 "FAIL*test_1*",
1107 ]
1108 )
1109
1110
1111def test_reportchars_all_error(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