(pytester: Pytester)
| 362 | |
| 363 | |
| 364 | def test_conftest_existing_junitxml(pytester: Pytester) -> None: |
| 365 | x = pytester.mkdir("tests") |
| 366 | x.joinpath("conftest.py").write_text( |
| 367 | textwrap.dedent( |
| 368 | """\ |
| 369 | def pytest_addoption(parser): |
| 370 | parser.addoption("--xyz", action="store_true") |
| 371 | """ |
| 372 | ) |
| 373 | ) |
| 374 | pytester.makefile(ext=".xml", junit="") # Writes junit.xml |
| 375 | result = pytester.runpytest("-h", "--junitxml", "junit.xml") |
| 376 | result.stdout.fnmatch_lines(["*--xyz*"]) |
| 377 | |
| 378 | |
| 379 | def test_conftest_import_order(pytester: Pytester, monkeypatch: MonkeyPatch) -> None: |
nothing calls this directly
no test coverage detected