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

Function test_reportchars

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

Source from the content-addressed store, hash-verified

1039
1040
1041def test_reportchars(pytester: Pytester) -> None:
1042 pytester.makepyfile(
1043 """
1044 import pytest
1045 def test_1():
1046 assert 0
1047 @pytest.mark.xfail
1048 def test_2():
1049 assert 0
1050 @pytest.mark.xfail
1051 def test_3():
1052 pass
1053 def test_4():
1054 pytest.skip("four")
1055 """
1056 )
1057 result = pytester.runpytest("-rfxXs")
1058 result.stdout.fnmatch_lines(
1059 ["FAIL*test_1*", "XFAIL*test_2*", "XPASS*test_3*", "SKIP*four*"]
1060 )
1061
1062
1063def test_reportchars_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