MCPcopy
hub / github.com/pytest-dev/pytest / test_plugin_skip

Method test_plugin_skip

testing/test_pluginmanager.py:328–341  ·  testing/test_pluginmanager.py::TestPytestPluginManager.test_plugin_skip
(self, pytester: Pytester, monkeypatch: MonkeyPatch)

Source from the content-addressed store, hash-verified

326
327 @pytest.mark.filterwarnings(class="st">"always")
328 def test_plugin_skip(self, pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
329 p = pytester.makepyfile(
330 skipping1=class="st">"""
331 import pytest
332 pytest.skip(class="st">"hello", allow_module_level=True)
333 class="st">"""
334 )
335 shutil.copy(p, p.with_name(class="st">"skipping2.py"))
336 monkeypatch.setenv(class="st">"PYTEST_PLUGINS", class="st">"skipping2")
337 result = pytester.runpytest(class="st">"-p", class="st">"skipping1", syspathinsert=True)
338 assert result.ret == ExitCode.NO_TESTS_COLLECTED
339 result.stdout.fnmatch_lines(
340 [class="st">"*skipped plugin*skipping1*hello*", class="st">"*skipped plugin*skipping2*hello*"]
341 )
342
343 def test_consider_env_plugin_instantiation(
344 self,

Callers

nothing calls this directly

Calls 5

copyMethod · 0.80
setenvMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected