(self, tmp_path: Path, monkeypatch: MonkeyPatch)
| 1908 | |
| 1909 | class TestRootdir: |
| 1910 | def test_simple_noini(self, tmp_path: Path, monkeypatch: MonkeyPatch) -> None: |
| 1911 | assert get_common_ancestor(Path.cwd(), [tmp_path]) == tmp_path |
| 1912 | a = tmp_path / "a" |
| 1913 | a.mkdir() |
| 1914 | assert get_common_ancestor(Path.cwd(), [a, tmp_path]) == tmp_path |
| 1915 | assert get_common_ancestor(Path.cwd(), [tmp_path, a]) == tmp_path |
| 1916 | monkeypatch.chdir(tmp_path) |
| 1917 | assert get_common_ancestor(Path.cwd(), []) == tmp_path |
| 1918 | no_path = tmp_path / "does-not-exist" |
| 1919 | assert get_common_ancestor(Path.cwd(), [no_path]) == tmp_path |
| 1920 | assert get_common_ancestor(Path.cwd(), [no_path / "a"]) == tmp_path |
| 1921 | |
| 1922 | @pytest.mark.parametrize( |
| 1923 | "name, contents", |
nothing calls this directly
no test coverage detected