Give an error if --confcutdir is not a valid directory (#2078)
(self, pytester: Pytester)
| 1329 | assert get_ini_default_for_type(type) == expected |
| 1330 | |
| 1331 | def test_confcutdir_check_isdir(self, pytester: Pytester) -> None: |
| 1332 | """Give an error if --confcutdir is not a valid directory (#2078)""" |
| 1333 | exp_match = r"^--confcutdir must be a directory, given: " |
| 1334 | with pytest.raises(pytest.UsageError, match=exp_match): |
| 1335 | pytester.parseconfig("--confcutdir", pytester.path.joinpath("file")) |
| 1336 | with pytest.raises(pytest.UsageError, match=exp_match): |
| 1337 | pytester.parseconfig("--confcutdir", pytester.path.joinpath("nonexistent")) |
| 1338 | |
| 1339 | p = pytester.mkdir("dir") |
| 1340 | config = pytester.parseconfig("--confcutdir", p) |
| 1341 | assert config.getoption("confcutdir") == str(p) |
| 1342 | |
| 1343 | @pytest.mark.parametrize( |
| 1344 | "names, expected", |
nothing calls this directly
no test coverage detected