Skip to content

Commit e034497

Browse files
committed
??? fix test
1 parent 2fb8c20 commit e034497

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test_ModelicaSystem.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def test_getters(tmp_path):
355355
assert len(output) == 2
356356
assert np.isclose(output[0], -0.4)
357357
assert np.isclose(output[1], -0.4)
358-
with pytest.raises(KeyError):
358+
with pytest.raises(OMPython.ModelicaSystemError): # TODO: KeyError
359359
mod.getOutputs("thisOutputDoesNotExist")
360360

361361
# getContinuous before simulate():
@@ -391,13 +391,13 @@ def test_getters(tmp_path):
391391
assert np.isclose(d["y"], dx_analytical, 1e-4)
392392
assert mod.getOutputs("y") == [d["y"]]
393393
assert mod.getOutputs(["y", "y"]) == [d["y"], d["y"]]
394-
with pytest.raises(KeyError):
394+
with pytest.raises(OMPython.ModelicaSystemError): # TODO: KeyError
395395
mod.getOutputs("thisOutputDoesNotExist")
396396

397397
# getContinuous after simulate() should return values at end of simulation:
398-
with pytest.raises(OMPython.ModelicaSystemError):
398+
with pytest.raises(OMPython.ModelicaSystemError): # TODO: KeyError
399399
mod.getContinuous("a") # a is a parameter
400-
with pytest.raises(OMPython.ModelicaSystemError):
400+
with pytest.raises(OMPython.ModelicaSystemError): # TODO: KeyError
401401
mod.getContinuous(["x", "a", "y"]) # a is a parameter
402402
d = mod.getContinuous()
403403
assert d.keys() == {"x", "der(x)", "y"}
@@ -407,10 +407,10 @@ def test_getters(tmp_path):
407407
assert mod.getContinuous("x") == [d["x"]]
408408
assert mod.getContinuous(["y", "x"]) == [d["y"], d["x"]]
409409

410-
with pytest.raises(OMPython.ModelicaSystemError):
410+
with pytest.raises(OMPython.ModelicaSystemError): # TODO: KeyError
411411
mod.getContinuous("a") # a is a parameter
412412

413-
with pytest.raises(OMPython.ModelicaSystemError):
413+
with pytest.raises(OMPython.ModelicaSystemError): # TODO: KeyError
414414
mod.setSimulationOptions(thisOptionDoesNotExist=3)
415415

416416

0 commit comments

Comments
 (0)