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

Function test_skipif_class

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

Source from the content-addressed store, hash-verified

966
967
968def test_skipif_class(pytester: Pytester) -> None:
969 p = pytester.makepyfile(
970 """
971 import pytest
972
973 class TestClass(object):
974 pytestmark = pytest.mark.skipif("True")
975 def test_that(self):
976 assert 0
977 def test_though(self):
978 assert 0
979 """
980 )
981 result = pytester.runpytest(p)
982 result.stdout.fnmatch_lines(["*2 skipped*"])
983
984
985def test_skipped_reasons_functional(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