File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33from copy import deepcopy
44
5- from petabtests import DEFAULT_PYSB_FILE
6-
75from petab .v2 import Problem
86from petab .v2 .lint import *
9- from petab .v2 .models .pysb_model import PySBModel
107from petab .v2 .models .sbml_model import SbmlModel
118
129
@@ -116,14 +113,14 @@ def test_check_mapping_table():
116113 """Test checks related to the mapping table."""
117114 problem = Problem ()
118115 # PySB model from PEtab test suite
119- problem .model = PySBModel . from_file ( DEFAULT_PYSB_FILE )
116+ problem .model = SbmlModel . from_antimony ( "a.mean = 1" )
120117 problem .add_mapping (
121- petab_id = "A_comp " ,
122- model_id = "A_() ** compartment " ,
118+ petab_id = "a_m " ,
119+ model_id = "a.mean " ,
123120 name = None ,
124121 )
125122 problem .add_parameter (
126- "A_comp " ,
123+ "a_m " ,
127124 estimate = True ,
128125 nominal_value = 2 ,
129126 lb = 0 ,
@@ -144,14 +141,9 @@ def test_check_mapping_table():
144141 assert check .run (problem ) is None
145142
146143 # Invalid: petabEntityId is referenced in the model
147- problem .mapping_tables = []
148- problem .add_mapping (
149- petab_id = "a0" ,
150- model_id = "A_() ** compartment" ,
151- name = None ,
152- )
144+ problem .model = SbmlModel .from_antimony ("a.mean = 1; a_m = 2" )
153145 assert (error := check .run (problem )) is not None
154146 assert (
155- "`a0 ` is used in the mapping table and referenced directly"
147+ "`a_m ` is used in the mapping table and referenced directly"
156148 in error .message
157149 )
You can’t perform that action at this time.
0 commit comments