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

Function test_conftest_confcutdir

testing/test_conftest.py:236–249  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

234
235
236def test_conftest_confcutdir(pytester: Pytester) -> None:
237 pytester.makeconftest("assert 0")
238 x = pytester.mkdir("x")
239 x.joinpath("conftest.py").write_text(
240 textwrap.dedent(
241 """\
242 def pytest_addoption(parser):
243 parser.addoption("--xyz", action="store_true")
244 """
245 )
246 )
247 result = pytester.runpytest("-h", "--confcutdir=%s" % x, x)
248 result.stdout.fnmatch_lines(["*--xyz*"])
249 result.stdout.no_fnmatch_line("*warning: could not load initial*")
250
251
252def test_conftest_symlink(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 5

fnmatch_linesMethod · 0.80
no_fnmatch_lineMethod · 0.80
makeconftestMethod · 0.45
mkdirMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected