Skip to content

Commit 44cb747

Browse files
committed
[test_ModelicaDoERunner] more tests
1 parent 480af21 commit 44cb747

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/test_ModelicaDoERunner.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def param_doe() -> dict[str, list]:
4343
return param
4444

4545

46-
def test_ModelicaDoEOMC_local(tmp_path, model_doe, param_doe):
46+
def test_ModelicaDoERunner_Runner(tmp_path, model_doe, param_doe):
4747
tmpdir = tmp_path / 'DoE'
4848
tmpdir.mkdir(exist_ok=True)
4949

@@ -56,8 +56,16 @@ def test_ModelicaDoEOMC_local(tmp_path, model_doe, param_doe):
5656
resultfile_mod = mod.getWorkDirectory() / f"{mod.get_model_name()}_res_mod.mat"
5757
_run_simulation(mod=mod, resultfile=resultfile_mod, param=param_doe)
5858

59+
# run the model using only the runner class
60+
omcs = OMPython.OMSessionRunner(
61+
version=mod.get_session().get_version(),
62+
)
63+
modr = OMPython.ModelicaSystemRunner(
64+
session=omcs,
65+
work_directory=mod.getWorkDirectory(),
66+
)
5967
doe_mod = OMPython.ModelicaDoERunner(
60-
mod=mod,
68+
mod=modr,
6169
parameters=param_doe,
6270
resultpath=tmpdir,
6371
)

0 commit comments

Comments
 (0)