@@ -39,9 +39,9 @@ def test_ModelicaSystem_loop(model_firstorder):
3939 def worker ():
4040 filePath = model_firstorder .as_posix ()
4141 mod = OMPython .ModelicaSystem ()
42- mod .model_definition (
42+ mod .model (
4343 file = filePath ,
44- model = "M" ,
44+ name = "M" ,
4545 )
4646 mod .simulate ()
4747 mod .convertMo2Fmu (fmuType = "me" )
@@ -53,9 +53,9 @@ def test_setParameters():
5353 omc = OMPython .OMCSessionZMQ ()
5454 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
5555 mod = OMPython .ModelicaSystem ()
56- mod .model_definition (
56+ mod .model (
5757 file = model_path + "BouncingBall.mo" ,
58- model = "BouncingBall" ,
58+ name = "BouncingBall" ,
5959 )
6060
6161 # method 1 (test depreciated variants)
@@ -87,9 +87,9 @@ def test_setSimulationOptions():
8787 omc = OMPython .OMCSessionZMQ ()
8888 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
8989 mod = OMPython .ModelicaSystem ()
90- mod .model_definition (
90+ mod .model (
9191 file = model_path + "BouncingBall.mo" ,
92- model = "BouncingBall" ,
92+ name = "BouncingBall" ,
9393 )
9494
9595 # method 1
@@ -124,9 +124,9 @@ def test_relative_path(model_firstorder):
124124 assert "/" not in model_relative
125125
126126 mod = OMPython .ModelicaSystem ()
127- mod .model_definition (
127+ mod .model (
128128 file = model_relative ,
129- model = "M" ,
129+ name = "M" ,
130130 )
131131 assert float (mod .getParameters ("a" )[0 ]) == - 1
132132 finally :
@@ -138,9 +138,9 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
138138 tmpdir = tmp_path / "tmpdir1"
139139 tmpdir .mkdir ()
140140 mod = OMPython .ModelicaSystem (customBuildDirectory = tmpdir )
141- mod .model_definition (
141+ mod .model (
142142 file = filePath ,
143- model = "M" ,
143+ name = "M" ,
144144 )
145145 assert pathlib .Path (mod .getWorkDirectory ()).resolve () == tmpdir .resolve ()
146146 result_file = tmpdir / "a.mat"
@@ -171,9 +171,9 @@ def test_getSolutions_docker(model_firstorder_content):
171171def test_getSolutions (model_firstorder ):
172172 filePath = model_firstorder .as_posix ()
173173 mod = OMPython .ModelicaSystem ()
174- mod .model_definition (
174+ mod .model (
175175 file = filePath ,
176- model = "M" ,
176+ name = "M" ,
177177 )
178178
179179 _run_getSolutions (mod )
@@ -219,9 +219,9 @@ def test_getters(tmp_path):
219219end M_getters;
220220""" )
221221 mod = OMPython .ModelicaSystem ()
222- mod .model_definition (
222+ mod .model (
223223 file = model_file .as_posix (),
224- model = "M_getters" ,
224+ name = "M_getters" ,
225225 )
226226
227227 q = mod .getQuantities ()
@@ -415,9 +415,9 @@ def test_simulate_inputs(tmp_path):
415415end M_input;
416416""" )
417417 mod = OMPython .ModelicaSystem ()
418- mod .model_definition (
418+ mod .model (
419419 file = model_file .as_posix (),
420- model = "M_input" ,
420+ name = "M_input" ,
421421 )
422422
423423 simOptions = {"stopTime" : 1.0 }
0 commit comments