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

Method test_skipfunction

testing/test_runner.py:146–164  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

144 # assert isinstance(rep.longrepr, ReprExceptionInfo)
145
146 def test_skipfunction(self, pytester: Pytester) -> None:
147 reports = pytester.runitem(
148 """
149 import pytest
150 def test_func():
151 pytest.skip("hello")
152 """
153 )
154 rep = reports[1]
155 assert not rep.failed
156 assert not rep.passed
157 assert rep.skipped
158 assert rep.outcome == "skipped"
159 # assert rep.skipped.when == "call"
160 # assert rep.skipped.when == "call"
161 # assert rep.skipped == "%sreason == "hello"
162 # assert rep.skipped.location.lineno == 3
163 # assert rep.skipped.location.path
164 # assert not rep.skipped.failurerepr
165
166 def test_skip_in_setup_function(self, pytester: Pytester) -> None:
167 reports = pytester.runitem(

Callers

nothing calls this directly

Calls 1

runitemMethod · 0.45

Tested by

no test coverage detected