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

Method test_directory_skipped

testing/acceptance_test.py:283–294  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

281 assert result.ret == ExitCode.USAGE_ERROR
282
283 def test_directory_skipped(self, pytester: Pytester) -> None:
284 pytester.makeconftest(
285 """
286 import pytest
287 def pytest_ignore_collect():
288 pytest.skip("intentional")
289 """
290 )
291 pytester.makepyfile("def test_hello(): pass")
292 result = pytester.runpytest()
293 assert result.ret == ExitCode.NO_TESTS_COLLECTED
294 result.stdout.fnmatch_lines(["*1 skipped*"])
295
296 def test_multiple_items_per_collector_byid(self, pytester: Pytester) -> None:
297 c = pytester.makeconftest(

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
makeconftestMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected