Skip to content

Commit a1fcf3b

Browse files
committed
fix testing matrix
1 parent 79fa679 commit a1fcf3b

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

tests/test_cli.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
# each user input
2727
case_params = [
2828
(
29+
"case1", # case with empty pack
2930
[
3031
["empty_pack"], # 4) all examples from a pack (but pack is empty)
3132
["all"], # 6) all examples from all packs (but pack is empty)
@@ -36,6 +37,7 @@
3637
],
3738
),
3839
(
40+
"case2", # case with one pack with multiple examples
3941
[
4042
["ex1"], # 1) single example
4143
["ex1", "ex2"], # 2) multiple examples from same pack
@@ -62,6 +64,7 @@
6264
],
6365
),
6466
(
67+
"case3", # case with multiple packs with multiple examples
6568
[
6669
["ex1"], # 1) single example from packA
6770
["ex1", "ex2"], # 2) list of examples from same pack
@@ -100,6 +103,7 @@
100103
],
101104
),
102105
(
106+
"case4", # case with no packs (empty examples directory)
103107
[
104108
["all"], # 6) all examples from all packs (but examples exist)
105109
],
@@ -108,6 +112,7 @@
108112
],
109113
),
110114
(
115+
"case5", # case with multiple packs with same example names
111116
[
112117
["ex1"], # 1) single example (ambiguous, should get both)
113118
[
@@ -141,22 +146,8 @@
141146
]
142147

143148

144-
@pytest.mark.parametrize(
145-
"case,target",
146-
[
147-
("case1", None),
148-
("case1", "user_target"),
149-
("case2", None),
150-
("case2", "user_target"),
151-
("case3", None),
152-
("case3", "user_target"),
153-
("case4", None),
154-
("case4", "user_target"),
155-
("case5", None),
156-
("case5", "user_target"),
157-
],
158-
)
159-
@pytest.mark.parametrize("user_inputs,expected", case_params)
149+
@pytest.mark.parametrize("target", [None, "user_target"])
150+
@pytest.mark.parametrize("case,user_inputs,expected", case_params)
160151
def test_copy_examples(case, user_inputs, expected, target, example_cases):
161152
cwd = example_cases / "cwd"
162153
os.chdir(cwd)

0 commit comments

Comments
 (0)