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

Method test_skip_with_reason

testing/test_skipping.py:826–836  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

824 result.stdout.fnmatch_lines(["*unconditional skip*", "*1 skipped*"])
825
826 def test_skip_with_reason(self, pytester: Pytester) -> None:
827 pytester.makepyfile(
828 """
829 import pytest
830 @pytest.mark.skip(reason="for lolz")
831 def test_bar():
832 pass
833 """
834 )
835 result = pytester.runpytest("-rs")
836 result.stdout.fnmatch_lines(["*for lolz*", "*1 skipped*"])
837
838 def test_only_skips_marked_test(self, pytester: Pytester) -> None:
839 pytester.makepyfile(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected