Skip to content

Commit 6b1b196

Browse files
committed
Add xfail test case for issue zeusops#11
1 parent daf9f13 commit 6b1b196

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

tests/test_list_missions.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,28 @@
1414

1515

1616
@pytest.mark.parametrize(
17-
"mission_names", [["mission1", "mission2"], []], ids=["two missions", "empty"]
17+
("filenames", "mission_names"),
18+
[
19+
(["mission1.json", "mission2.json"], ["mission1", "mission2"]),
20+
([], []),
21+
pytest.param(
22+
["mission1.json", "mission2.json", ".gitignore"],
23+
["mission1", "mission2"],
24+
marks=pytest.mark.xfail(reason="GH#11"),
25+
),
26+
],
27+
ids=["two missions", "empty", "non-json extra"],
1828
)
1929
def test_list_missions(
20-
mission_dir: Path, config_gen: ReforgerConfigGenerator, mission_names: list[str]
30+
mission_dir: Path,
31+
config_gen: ReforgerConfigGenerator,
32+
filenames: list[str],
33+
mission_names: list[str],
2134
):
2235
"""Scenario: List uploaded missions"""
2336
# Given files "mission1.json" and "mission2.json" exist in the mission directory
24-
for mission_name in mission_names:
25-
(mission_dir / mission_name).with_suffix(".json").touch()
37+
for filename in filenames:
38+
(mission_dir / filename).with_suffix(".json").touch()
2639
# When Zeus calls "/zeus-list"
2740
result: list[str] = config_gen.list_missions()
2841
# Then a list of mission names is returned

0 commit comments

Comments
 (0)