Skip to content
Snippets Groups Projects
Commit dad61cd2 authored by Christoph Lehmann's avatar Christoph Lehmann
Browse files

[T] Added Python BC pytest

parent 3f6fb336
No related branches found
No related tags found
No related merge requests found
import tempfile
import os
import pytest
import ogs.simulator as sim
def test_HM_ground_equil_TaylorHood_Python():
srcdir = os.path.join(os.path.dirname(__file__), "..", "..")
prjpath = os.path.join(
srcdir,
"Tests/Data/HydroMechanics/GroundEquilibrium/simHM_ground_quadBCu_python.prj",
)
with tempfile.TemporaryDirectory() as tmpdirname:
arguments = ["ogs", prjpath, "-o", tmpdirname]
try:
print("Python OpenGeoSys.init ...")
assert 0 == sim.initialize(arguments)
print("Python OpenGeoSys.executeSimulation ...")
assert 0 == sim.executeSimulation()
finally:
print("Python OpenGeoSys.finalize() ...")
sim.finalize()
assert os.path.exists(
os.path.join(
tmpdirname, "simHM_ground_quadBCu_python_ts_10_t_1000000.000000.vtu"
)
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment