#4460 Improved error messages for pytest

This commit is contained in:
Gaute Lindkvist 2019-06-05 08:59:30 +02:00
parent 196e7df0fa
commit 5b39860a41
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class Instance:
if not resInsightExecutable:
resInsightExecutable = os.environ.get('RESINSIGHT_EXECUTABLE')
if not resInsightExecutable:
print('Error: Could not launch any ResInsight instances because RESINSIGHT_EXECUTABLE is not set')
print('ERROR: Could not launch ResInsight because the environment variable'
' RESINSIGHT_EXECUTABLE is not set')
return None
while Instance.is_port_in_use(port):

View File

@ -8,6 +8,7 @@ import rips
instance = rips.Instance.launch()
if (not instance):
print("A ResInsight instance is required for running the tests")
exit(1)
@pytest.fixture