@@ -23,9 +23,9 @@ def test_ModelicaSystem_loop(model_firstorder):
2323 def worker ():
2424 filePath = model_firstorder .as_posix ()
2525 mod = OMPython .ModelicaSystem ()
26- mod .model_definition (
26+ mod .model (
2727 file = filePath ,
28- model = "M" ,
28+ name = "M" ,
2929 )
3030 mod .simulate ()
3131 mod .convertMo2Fmu (fmuType = "me" )
@@ -37,9 +37,9 @@ def test_setParameters():
3737 omc = OMPython .OMCSessionZMQ ()
3838 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
3939 mod = OMPython .ModelicaSystem ()
40- mod .model_definition (
40+ mod .model (
4141 file = model_path + "BouncingBall.mo" ,
42- model = "BouncingBall" ,
42+ name = "BouncingBall" ,
4343 )
4444
4545 # method 1 (test depreciated variants)
@@ -71,9 +71,9 @@ def test_setSimulationOptions():
7171 omc = OMPython .OMCSessionZMQ ()
7272 model_path = omc .sendExpression ("getInstallationDirectoryPath()" ) + "/share/doc/omc/testmodels/"
7373 mod = OMPython .ModelicaSystem ()
74- mod .model_definition (
74+ mod .model (
7575 file = model_path + "BouncingBall.mo" ,
76- model = "BouncingBall" ,
76+ name = "BouncingBall" ,
7777 )
7878
7979 # method 1
@@ -108,9 +108,9 @@ def test_relative_path(model_firstorder):
108108 assert "/" not in model_relative
109109
110110 mod = OMPython .ModelicaSystem ()
111- mod .model_definition (
111+ mod .model (
112112 file = model_relative ,
113- model = "M" ,
113+ name = "M" ,
114114 )
115115 assert float (mod .getParameters ("a" )[0 ]) == - 1
116116 finally :
@@ -122,9 +122,9 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
122122 tmpdir = tmp_path / "tmpdir1"
123123 tmpdir .mkdir ()
124124 mod = OMPython .ModelicaSystem (customBuildDirectory = tmpdir )
125- mod .model_definition (
125+ mod .model (
126126 file = filePath ,
127- model = "M" ,
127+ name = "M" ,
128128 )
129129 assert pathlib .Path (mod .getWorkDirectory ()).resolve () == tmpdir .resolve ()
130130 result_file = tmpdir / "a.mat"
@@ -136,9 +136,9 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
136136def test_getSolutions (model_firstorder ):
137137 filePath = model_firstorder .as_posix ()
138138 mod = OMPython .ModelicaSystem ()
139- mod .model_definition (
139+ mod .model (
140140 file = filePath ,
141- model = "M" ,
141+ name = "M" ,
142142 )
143143 x0 = 1
144144 a = - 1
@@ -179,9 +179,9 @@ def test_getters(tmp_path):
179179end M_getters;
180180""" )
181181 mod = OMPython .ModelicaSystem ()
182- mod .model_definition (
182+ mod .model (
183183 file = model_file .as_posix (),
184- model = "M_getters" ,
184+ name = "M_getters" ,
185185 )
186186
187187 q = mod .getQuantities ()
@@ -375,9 +375,9 @@ def test_simulate_inputs(tmp_path):
375375end M_input;
376376""" )
377377 mod = OMPython .ModelicaSystem ()
378- mod .model_definition (
378+ mod .model (
379379 file = model_file .as_posix (),
380- model = "M_input" ,
380+ name = "M_input" ,
381381 )
382382
383383 simOptions = {"stopTime" : 1.0 }
0 commit comments