Skip to content

Commit

Permalink
add convertMo2FMU test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Oct 30, 2020
1 parent 341d3fd commit 2bb000a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_ModelicaSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ def __init__(self, *args, **kwargs):
self.tmp = tempfile.mkdtemp(prefix='tmpOMPython.tests')
with open("%s/M.mo" % self.tmp, "w") as fout:
fout.write("""model M
Real r = time;
Real x(start = 1);
parameter Real a = -1;
equation
der(x) = x*a;
end M;
""")
def __del__(self):
Expand All @@ -20,6 +23,7 @@ def worker():
os.chdir(self.tmp)
m = OMPython.ModelicaSystem("M.mo", "M")
m.simulate()
m.convertMo2Fmu(fmuType="me")
os.chdir(origDir)
for _ in range(10):
worker()
Expand Down

0 comments on commit 2bb000a

Please sign in to comment.