File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,9 @@ def __init__(
198
198
if lmodel is None :
199
199
lmodel = []
200
200
201
+ if not isinstance (lmodel , list ):
202
+ raise ModelicaSystemError (f"Invalid input type for lmodel: { type (lmodel )} - list expected!" )
203
+
201
204
self .xmlFile = None
202
205
self .lmodel = lmodel # may be needed if model is derived from other model
203
206
self .modelName = modelName # Model class name
Original file line number Diff line number Diff line change @@ -14,15 +14,16 @@ def __del__(self):
14
14
15
15
def testCauerLowPassAnalog (self ):
16
16
print ("testing Cauer" )
17
- mod = OMPython .ModelicaSystem (modelName = "Modelica.Electrical.Analog.Examples.CauerLowPassAnalog" , lmodel = "Modelica" )
17
+ mod = OMPython .ModelicaSystem (modelName = "Modelica.Electrical.Analog.Examples.CauerLowPassAnalog" ,
18
+ lmodel = ["Modelica" ])
18
19
self .tmp = mod .getWorkDirectory ()
19
20
20
21
fmu = mod .convertMo2Fmu (fileNamePrefix = "CauerLowPassAnalog" )
21
22
self .assertEqual (True , os .path .exists (fmu ))
22
23
23
24
def testDrumBoiler (self ):
24
25
print ("testing DrumBoiler" )
25
- mod = OMPython .ModelicaSystem (modelName = "Modelica.Fluid.Examples.DrumBoiler.DrumBoiler" , lmodel = "Modelica" )
26
+ mod = OMPython .ModelicaSystem (modelName = "Modelica.Fluid.Examples.DrumBoiler.DrumBoiler" , lmodel = [ "Modelica" ] )
26
27
self .tmp = mod .getWorkDirectory ()
27
28
28
29
fmu = mod .convertMo2Fmu (fileNamePrefix = "DrumBoiler" )
You can’t perform that action at this time.
0 commit comments