Skip to content

Commit 70a0fb4

Browse files
committed
[ModelicaSystem/test_ModelicaSystem] fix test (csvFile no longer a class variable)
1 parent e3bb33d commit 70a0fb4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_ModelicaSystem.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,14 @@ def test_simulate_inputs(tmp_path):
396396
"u1=[(0.0, 0), (1.0, 1)]",
397397
"u2=[(0.0, 0), (0.25, 0.5), (0.5, 1.0), (1.0, 0)]",
398398
])
399-
mod.simulate()
400-
assert pathlib.Path(mod.csvFile).read_text() == """time,u1,u2,end
399+
csv_file = mod.createCSVData()
400+
assert pathlib.Path(csv_file).read_text() == """time,u1,u2,end
401401
0.0,0.0,0.0,0
402402
0.25,0.25,0.5,0
403403
0.5,0.5,1.0,0
404404
1.0,1.0,0.0,0
405405
"""
406+
407+
mod.simulate()
406408
y = mod.getSolutions("y")[0]
407409
assert np.isclose(y[-1], 1.0)

0 commit comments

Comments
 (0)