Skip to content

Commit 1d6a5a0

Browse files
committed
[test_ModelicaSystemOMC] rename from test_ModelicaSystem
1 parent cc749ae commit 1d6a5a0

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

Lines changed: 11 additions & 12 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",
@@ -55,7 +55,7 @@ def test_setParameters():
5555
omc = OMPython.OMCSessionZMQ()
5656
model_path_str = omc.sendExpression("getInstallationDirectoryPath()") + "/share/doc/omc/testmodels"
5757
model_path = omc.omcpath(model_path_str)
58-
mod = OMPython.ModelicaSystem()
58+
mod = OMPython.ModelicaSystemOMC()
5959
mod.model(
6060
model_file=model_path / "BouncingBall.mo",
6161
model_name="BouncingBall",
@@ -90,7 +90,7 @@ def test_setSimulationOptions():
9090
omc = OMPython.OMCSessionZMQ()
9191
model_path_str = omc.sendExpression("getInstallationDirectoryPath()") + "/share/doc/omc/testmodels"
9292
model_path = omc.omcpath(model_path_str)
93-
mod = OMPython.ModelicaSystem()
93+
mod = OMPython.ModelicaSystemOMC()
9494
mod.model(
9595
model_file=model_path / "BouncingBall.mo",
9696
model_name="BouncingBall",
@@ -127,7 +127,7 @@ def test_relative_path(model_firstorder):
127127
model_relative = str(model_file)
128128
assert "/" not in model_relative
129129

130-
mod = OMPython.ModelicaSystem()
130+
mod = OMPython.ModelicaSystemOMC()
131131
mod.model(
132132
model_file=model_relative,
133133
model_name="M",
@@ -140,7 +140,7 @@ def test_relative_path(model_firstorder):
140140
def test_customBuildDirectory(tmp_path, model_firstorder):
141141
tmpdir = tmp_path / "tmpdir1"
142142
tmpdir.mkdir()
143-
mod = OMPython.ModelicaSystem(work_directory=tmpdir)
143+
mod = OMPython.ModelicaSystemOMC(work_directory=tmpdir)
144144
mod.model(
145145
model_file=model_firstorder,
146146
model_name="M",
@@ -155,11 +155,10 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
155155
@skip_on_windows
156156
@skip_python_older_312
157157
def test_getSolutions_docker(model_firstorder):
158-
omcp = OMPython.OMCSessionDocker(docker="openmodelica/openmodelica:v1.25.0-minimal")
159-
omc = OMPython.OMCSessionZMQ(omc_process=omcp)
158+
omcs = OMPython.OMCSessionDocker(docker="openmodelica/openmodelica:v1.25.0-minimal")
160159

161-
mod = OMPython.ModelicaSystem(
162-
session=omc.omc_process,
160+
mod = OMPython.ModelicaSystemOMC(
161+
session=omcs,
163162
)
164163
mod.model(
165164
model_file=model_firstorder,
@@ -170,7 +169,7 @@ def test_getSolutions_docker(model_firstorder):
170169

171170

172171
def test_getSolutions(model_firstorder):
173-
mod = OMPython.ModelicaSystem()
172+
mod = OMPython.ModelicaSystemOMC()
174173
mod.model(
175174
model_file=model_firstorder,
176175
model_name="M",
@@ -218,7 +217,7 @@ def test_getters(tmp_path):
218217
y = der(x);
219218
end M_getters;
220219
""")
221-
mod = OMPython.ModelicaSystem()
220+
mod = OMPython.ModelicaSystemOMC()
222221
mod.model(
223222
model_file=model_file,
224223
model_name="M_getters",
@@ -427,7 +426,7 @@ def test_simulate_inputs(tmp_path):
427426
y = x;
428427
end M_input;
429428
""")
430-
mod = OMPython.ModelicaSystem()
429+
mod = OMPython.ModelicaSystemOMC()
431430
mod.model(
432431
model_file=model_file,
433432
model_name="M_input",

0 commit comments

Comments
 (0)