mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Python: test for opening project
This commit is contained in:
parent
ea4f310bc4
commit
8283d1ac86
@ -172,6 +172,7 @@ if (PYTHON_EXECUTABLE AND EXISTS ${PYTHON_EXECUTABLE})
|
||||
"tests/test_commands.py"
|
||||
"tests/test_grids.py"
|
||||
"tests/test_properties.py"
|
||||
"tests/test_project.py"
|
||||
"tests/conftest.py"
|
||||
"tests/dataroot.py"
|
||||
"requirements.txt"
|
||||
|
17
ApplicationCode/GrpcInterface/Python/tests/test_project.py
Normal file
17
ApplicationCode/GrpcInterface/Python/tests/test_project.py
Normal file
@ -0,0 +1,17 @@
|
||||
import sys
|
||||
import os
|
||||
import pytest
|
||||
|
||||
sys.path.insert(1, os.path.join(sys.path[0], '..'))
|
||||
import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
def test_loadProject(rips_instance, initializeTest):
|
||||
project = rips_instance.project.open(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp")
|
||||
case = project.case(id=0)
|
||||
assert(case is not None)
|
||||
assert(case.name == "TEST10K_FLT_LGR_NNC")
|
||||
assert(case.id == 0)
|
||||
cases = rips_instance.project.cases()
|
||||
assert(len(cases) is 1)
|
Loading…
Reference in New Issue
Block a user