File tree 1 file changed +23
-5
lines changed
1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,32 @@ def test_creates_config_dir_not_exists(tmp_path: pathlib.Path) -> None:
31
31
assert tmp_path .exists ()
32
32
33
33
34
+ class HelpTestFixture (t .NamedTuple ):
35
+ """Test fixture for help command tests."""
36
+
37
+ test_id : str
38
+ cli_args : list [str ]
39
+
40
+
41
+ HELP_TEST_FIXTURES : list [HelpTestFixture ] = [
42
+ HelpTestFixture (
43
+ test_id = "help_long_flag" ,
44
+ cli_args = ["--help" ],
45
+ ),
46
+ HelpTestFixture (
47
+ test_id = "help_short_flag" ,
48
+ cli_args = ["-h" ],
49
+ ),
50
+ ]
51
+
52
+
34
53
@pytest .mark .parametrize (
35
- "cli_args" ,
36
- [
37
- (["--help" ]),
38
- (["-h" ]),
39
- ],
54
+ list (HelpTestFixture ._fields ),
55
+ HELP_TEST_FIXTURES ,
56
+ ids = [test .test_id for test in HELP_TEST_FIXTURES ],
40
57
)
41
58
def test_help (
59
+ test_id : str ,
42
60
cli_args : list [str ],
43
61
tmp_path : pathlib .Path ,
44
62
monkeypatch : pytest .MonkeyPatch ,
You can’t perform that action at this time.
0 commit comments