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

Function test_exclude

testing/test_session.py:266–274  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

264
265
266def test_exclude(pytester: Pytester) -> None:
267 hellodir = pytester.mkdir("hello")
268 hellodir.joinpath("test_hello.py").write_text("x y syntaxerror")
269 hello2dir = pytester.mkdir("hello2")
270 hello2dir.joinpath("test_hello2.py").write_text("x y syntaxerror")
271 pytester.makepyfile(test_ok="def test_pass(): pass")
272 result = pytester.runpytest("--ignore=hello", "--ignore=hello2")
273 assert result.ret == 0
274 result.stdout.fnmatch_lines(["*1 passed*"])
275
276
277def test_exclude_glob(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

fnmatch_linesMethod · 0.80
mkdirMethod · 0.45
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected