#4465 Implement all remaining command file commands and add tests for some commands

This commit is contained in:
Gaute Lindkvist
2019-06-05 11:26:19 +02:00
parent 5b39860a41
commit a0d81a08e8
5 changed files with 120 additions and 3 deletions

View File

@@ -14,6 +14,13 @@ resInsight.commands.setMainWindowSize(width=800, height=500)
with tempfile.TemporaryDirectory(prefix="rips") as tmpdirname:
print("Temporary folder: ", tmpdirname)
resInsight.commands.setExportFolder(type='SNAPSHOTS', path=tmpdirname)
resInsight.commands.setExportFolder(type='PROPERTIES', path=tmpdirname)
resInsight.commands.exportSnapshots()
print(os.listdir(tmpdirname))
assert(len(os.listdir(tmpdirname)) > 0)
assert(len(os.listdir(tmpdirname)) > 0)
case = resInsight.project.case(id=0)
resInsight.commands.exportPropertyInViews(0, "3D View", 0)
expectedFileName = case.name + "-" + str("3D_View") + "-" + "T3" + "-SOIL"
fullPath = tmpdirname + "/" + expectedFileName
assert(os.path.exists(fullPath))