Skip to content

Commit df8f8ba

Browse files
committed
[test_*] use ModelicaSystemOMC
1 parent f0f87a2 commit df8f8ba

7 files changed

Lines changed: 12 additions & 12 deletions

tests/test_FMIExport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
def test_CauerLowPassAnalog():
9-
mod = OMPython.ModelicaSystem()
9+
mod = OMPython.ModelicaSystemOMC()
1010
mod.model(
1111
model_name="Modelica.Electrical.Analog.Examples.CauerLowPassAnalog",
1212
libraries=["Modelica"],
@@ -20,7 +20,7 @@ def test_CauerLowPassAnalog():
2020

2121

2222
def test_DrumBoiler():
23-
mod = OMPython.ModelicaSystem()
23+
mod = OMPython.ModelicaSystemOMC()
2424
mod.model(
2525
model_name="Modelica.Fluid.Examples.DrumBoiler.DrumBoiler",
2626
libraries=["Modelica"],

tests/test_FMIImport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def model_firstorder(tmp_path):
2222

2323
def test_FMIImport(model_firstorder):
2424
# create model & simulate it
25-
mod1 = OMPython.ModelicaSystem()
25+
mod1 = OMPython.ModelicaSystemOMC()
2626
mod1.model(
2727
model_file=model_firstorder,
2828
model_name="M",
@@ -35,7 +35,7 @@ def test_FMIImport(model_firstorder):
3535

3636
# import FMU & check & simulate
3737
# TODO: why is '--allowNonStandardModelica=reinitInAlgorithms' needed? any example without this possible?
38-
mod2 = OMPython.ModelicaSystem(command_line_options=['--allowNonStandardModelica=reinitInAlgorithms'])
38+
mod2 = OMPython.ModelicaSystemOMC(command_line_options=['--allowNonStandardModelica=reinitInAlgorithms'])
3939
mo = mod2.convertFmu2Mo(fmu=fmu)
4040
assert os.path.exists(mo)
4141

tests/test_ModelicaSystemCmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def model_firstorder(tmp_path):
1818

1919
@pytest.fixture
2020
def mscmd_firstorder(model_firstorder):
21-
mod = OMPython.ModelicaSystem()
21+
mod = OMPython.ModelicaSystemOMC()
2222
mod.model(
2323
model_file=model_firstorder,
2424
model_name="M",

tests/test_ModelicaSystemDoE.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_ModelicaSystemDoE_local(tmp_path, model_doe, param_doe):
5555
tmpdir = tmp_path / 'DoE'
5656
tmpdir.mkdir(exist_ok=True)
5757

58-
mod = OMPython.ModelicaSystem()
58+
mod = OMPython.ModelicaSystemOMC()
5959
mod.model(
6060
model_file=model_doe,
6161
model_name="M",
@@ -77,7 +77,7 @@ def test_ModelicaSystemDoE_docker(tmp_path, model_doe, param_doe):
7777
omcs = OMPython.OMCSessionDocker(docker="openmodelica/openmodelica:v1.25.0-minimal")
7878
assert omcs.sendExpression("getVersion()") == "OpenModelica 1.25.0"
7979

80-
mod = OMPython.ModelicaSystem(
80+
mod = OMPython.ModelicaSystemOMC(
8181
session=omcs,
8282
)
8383
mod.model(
@@ -100,7 +100,7 @@ def test_ModelicaSystemDoE_WSL(tmp_path, model_doe, param_doe):
100100
omcs = OMPython.OMCSessionWSL()
101101
assert omcs.sendExpression("getVersion()") == "OpenModelica 1.25.0"
102102

103-
mod = OMPython.ModelicaSystem(
103+
mod = OMPython.ModelicaSystemOMC(
104104
session=omcs,
105105
)
106106
mod.model(

tests/test_OMSessionCmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_isPackage():
88

99

1010
def test_isPackage2():
11-
mod = OMPython.ModelicaSystem()
11+
mod = OMPython.ModelicaSystemOMC()
1212
mod.model(
1313
model_name="Modelica.Electrical.Analog.Examples.CauerLowPassAnalog",
1414
libraries=["Modelica"],

tests/test_linearization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def model_linearTest(tmp_path):
2525

2626

2727
def test_example(model_linearTest):
28-
mod = OMPython.ModelicaSystem()
28+
mod = OMPython.ModelicaSystemOMC()
2929
mod.model(
3030
model_file=model_linearTest,
3131
model_name="linearTest",
@@ -60,7 +60,7 @@ def test_getters(tmp_path):
6060
y2 = phi + u1;
6161
end Pendulum;
6262
""")
63-
mod = OMPython.ModelicaSystem()
63+
mod = OMPython.ModelicaSystemOMC()
6464
mod.model(
6565
model_file=model_file,
6666
model_name="Pendulum",

tests/test_optimization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_optimization_example(tmp_path):
3434
end BangBang2021;
3535
""")
3636

37-
mod = OMPython.ModelicaSystem()
37+
mod = OMPython.ModelicaSystemOMC()
3838
mod.model(
3939
model_file=model_file,
4040
model_name="BangBang2021",

0 commit comments

Comments
 (0)