(pytester: Pytester)
| 234 | |
| 235 | |
| 236 | def 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 | |
| 252 | def test_conftest_symlink(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected