Skip to content

Commit fafaa53

Browse files
committed
Use SBML in test
1 parent b4d0f35 commit fafaa53

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

tests/v2/test_lint.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
from copy import deepcopy
44

5-
from petabtests import DEFAULT_PYSB_FILE
6-
75
from petab.v2 import Problem
86
from petab.v2.lint import *
9-
from petab.v2.models.pysb_model import PySBModel
107
from 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
)

0 commit comments

Comments
 (0)