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

Method test_wrong_skip_usage

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

Source from the content-addressed store, hash-verified

865 result.stdout.fnmatch_lines(["*unconditional skip*", "*1 skipped*"])
866
867 def test_wrong_skip_usage(self, pytester: Pytester) -> None:
868 pytester.makepyfile(
869 """
870 import pytest
871 @pytest.mark.skip(False, reason="I thought this was skipif")
872 def test_hello():
873 pass
874 """
875 )
876 result = pytester.runpytest()
877 result.stdout.fnmatch_lines(
878 [
879 "*TypeError: *__init__() got multiple values for argument 'reason'"
880 " - maybe you meant pytest.mark.skipif?"
881 ]
882 )
883
884
885class TestSkipif:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected