Skip to content

Commit 2630652

Browse files
committed
fix: get_test_scenario
1 parent d2afa6f commit 2630652

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests_integration/collect_test_scenarios.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,10 @@ def get_test_scenario(scenario_id: int) -> dict[str, TestCase]:
4848
# in-place
4949
random.shuffle(test_cases)
5050

51-
def pop_test_scenario():
52-
scenario: dict[str, TestCase] = {}
53-
for feedstock in test_cases_extended:
54-
scenario[feedstock] = test_cases_extended[feedstock].pop()
55-
return scenario
56-
57-
for _ in range(scenario_id):
58-
pop_test_scenario()
59-
60-
return pop_test_scenario()
51+
# At this point, test_cases_extended[feedstock][i] is the test case for
52+
# feedstock "feedstock" in the i-th test scenario.
53+
# We need to return the i-th test scenario, so we set i to scenario_id.
54+
return {
55+
feedstock: test_cases_extended[feedstock][scenario_id]
56+
for feedstock in test_cases_extended
57+
}

0 commit comments

Comments
 (0)