File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed
Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -66,18 +66,18 @@ def pytest_generate_tests(metafunc):
6666 """Parameterize tests"""
6767
6868 # Run for all SBML semantic test suite cases
69- if "test_number " in metafunc .fixturenames :
69+ if "test_id " in metafunc .fixturenames :
7070 # Get CLI option
7171 cases = metafunc .config .getoption ("cases" )
7272 if cases :
7373 # Run selected tests
7474 last_id = int (list (get_all_semantic_case_ids ())[- 1 ])
7575 test_numbers = sorted (set (parse_selection (cases , last_id )))
76+ test_ids = map (format_test_id , test_numbers )
7677 else :
7778 # Run all tests
78- test_numbers = get_all_semantic_case_ids ()
79- test_numbers = map (format_test_id , test_numbers )
80- metafunc .parametrize ("test_number" , test_numbers )
79+ test_ids = get_all_semantic_case_ids ()
80+ metafunc .parametrize ("test_id" , test_ids )
8181
8282
8383def pytest_sessionfinish (session , exitstatus ):
Original file line number Diff line number Diff line change 2424from amici .constants import SymbolId
2525from amici .gradient_check import check_derivatives
2626from numpy .testing import assert_allclose
27- from tests .sbml .conftest import format_test_id
2827
2928
3029@pytest .fixture (scope = "session" )
@@ -45,10 +44,7 @@ def sbml_test_dir():
4544 sys .path = old_path
4645
4746
48- def test_sbml_testsuite_case (
49- test_number , result_path , sbml_semantic_cases_dir
50- ):
51- test_id = format_test_id (test_number )
47+ def test_sbml_testsuite_case (test_id , result_path , sbml_semantic_cases_dir ):
5248 model_dir = None
5349
5450 # test cases for which sensitivities are to be checked
Original file line number Diff line number Diff line change 2323 find_model_file ,
2424 read_settings_file ,
2525)
26- from tests .sbml .conftest import format_test_id
2726
2827jax .config .update ("jax_enable_x64" , True )
2928
@@ -127,9 +126,8 @@ class RData(dict):
127126
128127
129128def test_sbml_testsuite_case_jax (
130- test_number , result_path_jax , sbml_semantic_cases_dir
129+ test_id , result_path_jax , sbml_semantic_cases_dir
131130):
132- test_id = format_test_id (test_number )
133131 model_dir = Path (__file__ ).parent / "SBMLTestModelsJax" / test_id
134132 try :
135133 current_test_path = sbml_semantic_cases_dir / test_id
You can’t perform that action at this time.
0 commit comments