(pytester: Pytester)
| 442 | |
| 443 | |
| 444 | def test_conftest_found_with_double_dash(pytester: Pytester) -> None: |
| 445 | sub = pytester.mkdir("sub") |
| 446 | sub.joinpath("conftest.py").write_text( |
| 447 | textwrap.dedent( |
| 448 | """\ |
| 449 | def pytest_addoption(parser): |
| 450 | parser.addoption("--hello-world", action="store_true") |
| 451 | """ |
| 452 | ) |
| 453 | ) |
| 454 | p = sub.joinpath("test_hello.py") |
| 455 | p.write_text("def test_hello(): pass") |
| 456 | result = pytester.runpytest(str(p) + "::test_hello", "-h") |
| 457 | result.stdout.fnmatch_lines( |
| 458 | """ |
| 459 | *--hello-world* |
| 460 | """ |
| 461 | ) |
| 462 | |
| 463 | |
| 464 | class TestConftestVisibility: |
nothing calls this directly
no test coverage detected