Skip to content

Commit 69bade1

Browse files
committed
[test_ModelicaSystem] fix tests - use local file as it is copied if needed
1 parent fe4016a commit 69bade1

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/test_ModelicaSystem.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,30 +153,25 @@ def test_customBuildDirectory(tmp_path, model_firstorder):
153153

154154
@skip_on_windows
155155
@skip_python_older_312
156-
def test_getSolutions_docker(model_firstorder_content):
156+
def test_getSolutions_docker(model_firstorder):
157157
omcp = OMPython.OMCProcessDocker(docker="openmodelica/openmodelica:v1.25.0-minimal")
158158
omc = OMPython.OMCSessionZMQ(omc_process=omcp)
159159

160-
modelpath = omc.omcpath_tempdir() / 'M.mo'
161-
modelpath.write_text(model_firstorder_content)
162-
163-
file_path = pathlib.Path(modelpath)
164160
mod = OMPython.ModelicaSystem(
165161
omc_process=omc.omc_process,
166162
)
167163
mod.model(
168164
name="M",
169-
file=file_path,
165+
file=model_firstorder.as_posix(),
170166
)
171167

172168
_run_getSolutions(mod)
173169

174170

175171
def test_getSolutions(model_firstorder):
176-
filePath = model_firstorder.as_posix()
177172
mod = OMPython.ModelicaSystem()
178173
mod.model(
179-
file=filePath,
174+
file=model_firstorder.as_posix(),
180175
name="M",
181176
)
182177

0 commit comments

Comments
 (0)