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

Function test_setup_that_skips_calledagain

testing/test_runner_xunit.py:183–196  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

181
182
183def test_setup_that_skips_calledagain(pytester: Pytester) -> None:
184 p = pytester.makepyfile(
185 """
186 import pytest
187 def setup_module(mod):
188 pytest.skip("x")
189 def test_function1():
190 pass
191 def test_function2():
192 pass
193 """
194 )
195 reprec = pytester.inline_run(p)
196 reprec.assertoutcome(skipped=2)
197
198
199def test_setup_fails_again_on_all_tests(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected