Skip to content

Commit f0f87a2

Browse files
committed
[test_ModelicaSystemOMC] rename from ModelicaSystem and update
1 parent 0b43d24 commit f0f87a2

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def model_firstorder(tmp_path, model_firstorder_content):
4040

4141
def test_ModelicaSystem_loop(model_firstorder):
4242
def worker():
43-
mod = OMPython.ModelicaSystem()
43+
mod = OMPython.ModelicaSystemOMC()
4444
mod.model(
4545
model_file=model_firstorder,
4646
model_name="M",
@@ -56,7 +56,9 @@ def test_setParameters():
5656
omcs = OMPython.OMCSessionLocal()
5757
model_path_str = omcs.sendExpression("getInstallationDirectoryPath()") + "/share/doc/omc/testmodels"
5858
model_path = omcs.omcpath(model_path_str)
59-
mod = OMPython.ModelicaSystem()
59+
mod = OMPython.ModelicaSystemOMC(
60+
session=omcs,
61+
)
6062
mod.model(
6163
model_file=model_path / "BouncingBall.mo",
6264
model_name="BouncingBall",
@@ -91,7 +93,9 @@ def test_setSimulationOptions():
9193
omcs = OMPython.OMCSessionLocal()
9294
model_path_str = omcs.sendExpression("getInstallationDirectoryPath()") + "/share/doc/omc/testmodels"
9395
model_path = omcs.omcpath(model_path_str)
94-
mod = OMPython.ModelicaSystem()
96+
mod = OMPython.ModelicaSystemOMC(
97+
session=omcs,
98+
)
9599
mod.model(
96100
model_file=model_path / "BouncingBall.mo",
97101
model_name="BouncingBall",
@@ -128,7 +132,7 @@ def test_relative_path(model_firstorder):
128132
model_relative = str(model_file)
129133
assert "/" not in model_relative
130134

131-
mod = OMPython.ModelicaSystem()
135+
mod = OMPython.ModelicaSystemOMC()
132136
mod.model(
133137
model_file=model_relative,
134138
model_name="M",
@@ -141,7 +145,7 @@ def test_relative_path(model_firstorder):
141145
def test_customBuildDirectory(tmp_path, model_firstorder):
142146
tmpdir = tmp_path / "tmpdir1"
143147
tmpdir.mkdir()
144-
mod = OMPython.ModelicaSystem(work_directory=tmpdir)
148+
mod = OMPython.ModelicaSystemOMC(work_directory=tmpdir)
145149
mod.model(
146150
model_file=model_firstorder,
147151
model_name="M",
@@ -157,7 +161,7 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
157161
@skip_python_older_312
158162
def test_getSolutions_docker(model_firstorder):
159163
omcs = OMPython.OMCSessionDocker(docker="openmodelica/openmodelica:v1.25.0-minimal")
160-
mod = OMPython.ModelicaSystem(
164+
mod = OMPython.ModelicaSystemOMC(
161165
session=omcs,
162166
)
163167
mod.model(
@@ -169,7 +173,7 @@ def test_getSolutions_docker(model_firstorder):
169173

170174

171175
def test_getSolutions(model_firstorder):
172-
mod = OMPython.ModelicaSystem()
176+
mod = OMPython.ModelicaSystemOMC()
173177
mod.model(
174178
model_file=model_firstorder,
175179
model_name="M",
@@ -217,7 +221,7 @@ def test_getters(tmp_path):
217221
y = der(x);
218222
end M_getters;
219223
""")
220-
mod = OMPython.ModelicaSystem()
224+
mod = OMPython.ModelicaSystemOMC()
221225
mod.model(
222226
model_file=model_file,
223227
model_name="M_getters",
@@ -426,7 +430,7 @@ def test_simulate_inputs(tmp_path):
426430
y = x;
427431
end M_input;
428432
""")
429-
mod = OMPython.ModelicaSystem()
433+
mod = OMPython.ModelicaSystemOMC()
430434
mod.model(
431435
model_file=model_file,
432436
model_name="M_input",

0 commit comments

Comments
 (0)