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__(
198198 if lmodel is None :
199199 lmodel = []
200200
201+ if not isinstance (lmodel , list ):
202+ raise ModelicaSystemError (f"Invalid input type for lmodel: { type (lmodel )} - list expected!" )
203+
201204 self .xmlFile = None
202205 self .lmodel = lmodel # may be needed if model is derived from other model
203206 self .modelName = modelName # Model class name
Original file line number Diff line number Diff line change @@ -14,15 +14,16 @@ def __del__(self):
1414
1515 def testCauerLowPassAnalog (self ):
1616 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" ])
1819 self .tmp = mod .getWorkDirectory ()
1920
2021 fmu = mod .convertMo2Fmu (fileNamePrefix = "CauerLowPassAnalog" )
2122 self .assertEqual (True , os .path .exists (fmu ))
2223
2324 def testDrumBoiler (self ):
2425 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" ] )
2627 self .tmp = mod .getWorkDirectory ()
2728
2829 fmu = mod .convertMo2Fmu (fileNamePrefix = "DrumBoiler" )
You can’t perform that action at this time.
0 commit comments