(self, pytester: Pytester, tmp_path: Path)
| 593 | assert config.getoption("x", 1) == 1 |
| 594 | |
| 595 | def test_getconftest_pathlist(self, pytester: Pytester, tmp_path: Path) -> None: |
| 596 | somepath = tmp_path.joinpath("x", "y", "z") |
| 597 | p = tmp_path.joinpath("conftest.py") |
| 598 | p.write_text(f"mylist = {['.', str(somepath)]}") |
| 599 | config = pytester.parseconfigure(p) |
| 600 | assert ( |
| 601 | config._getconftest_pathlist("notexist", path=tmp_path, rootpath=tmp_path) |
| 602 | is None |
| 603 | ) |
| 604 | pl = ( |
| 605 | config._getconftest_pathlist("mylist", path=tmp_path, rootpath=tmp_path) |
| 606 | or [] |
| 607 | ) |
| 608 | print(pl) |
| 609 | assert len(pl) == 2 |
| 610 | assert pl[0] == tmp_path |
| 611 | assert pl[1] == somepath |
| 612 | |
| 613 | @pytest.mark.parametrize("maybe_type", ["not passed", "None", '"string"']) |
| 614 | def test_addini(self, pytester: Pytester, maybe_type: str) -> None: |
nothing calls this directly
no test coverage detected