Give an error if --confcutdir is not a valid directory (#2078)
(self, pytester: Pytester)
| 802 | assert values == ["456", "123"] |
| 803 | |
| 804 | def test_confcutdir_check_isdir(self, pytester: Pytester) -> None: |
| 805 | """Give an error if --confcutdir is not a valid directory (#2078)""" |
| 806 | exp_match = r"^--confcutdir must be a directory, given: " |
| 807 | with pytest.raises(pytest.UsageError, match=exp_match): |
| 808 | pytester.parseconfig("--confcutdir", pytester.path.joinpath("file")) |
| 809 | with pytest.raises(pytest.UsageError, match=exp_match): |
| 810 | pytester.parseconfig("--confcutdir", pytester.path.joinpath("nonexistent")) |
| 811 | |
| 812 | p = pytester.mkdir("dir") |
| 813 | config = pytester.parseconfig("--confcutdir", p) |
| 814 | assert config.getoption("confcutdir") == str(p) |
| 815 | |
| 816 | @pytest.mark.parametrize( |
| 817 | "names, expected", |
nothing calls this directly
no test coverage detected