mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
Python: tidied up tests
This commit is contained in:
parent
2cbfecd2e6
commit
05451aa904
@ -26,8 +26,6 @@ class App:
|
||||
print("Telling ResInsight to Exit")
|
||||
return self.app.Exit(Empty())
|
||||
def isConsole(self):
|
||||
print("RunTimeInfo stuff: ", self.app.GetRuntimeInfo(Empty()).app_type)
|
||||
return self.app.GetRuntimeInfo(Empty()).app_type == App_pb2.ApplicationTypeEnum.Value('CONSOLE_APPLICATION')
|
||||
def isGui(self):
|
||||
print("RunTimeInfo stuff: ", self.app.GetRuntimeInfo(Empty()).app_type)
|
||||
return self.app.GetRuntimeInfo(Empty()).app_type == App_pb2.ApplicationTypeEnum.Value('GUI_APPLICATION')
|
||||
|
@ -8,6 +8,10 @@ import rips
|
||||
|
||||
_rips_instance = None
|
||||
|
||||
if not os.environ.get("RESINSIGHT_EXECUTABLE"):
|
||||
print("ERROR: Need to have the environment variable RESINSIGHT_EXECUTABLE set to a valid ResInsight executable")
|
||||
exit(1)
|
||||
|
||||
@pytest.fixture
|
||||
def rips_instance():
|
||||
return _rips_instance
|
||||
@ -26,3 +30,4 @@ def pytest_configure(config):
|
||||
print("Should run as console app")
|
||||
console = True
|
||||
_rips_instance = rips.Instance.launch(console=console)
|
||||
assert(_rips_instance is not None)
|
||||
|
Loading…
Reference in New Issue
Block a user