Skip to content
This repository was archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
Skip std_enkf_debug test if the debug library is not found in source …
Browse files Browse the repository at this point in the history
…folder
  • Loading branch information
oyvindeide authored and Andrea Brambilla committed Jul 30, 2019
1 parent f9420ae commit c4cdbae
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/tests/res/analysis/test_std_enkf_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import sys
import os

import pytest

from tests import ResTest
from res.analysis import AnalysisModule, AnalysisModuleLoadStatusEnum, AnalysisModuleOptionsEnum
from ecl.util.enums import RngAlgTypeEnum, RngInitModeEnum
Expand All @@ -33,10 +35,14 @@ class StdEnKFDebugTest(ResTest):
def setUp(self):
self.rng = RandomNumberGenerator(RngAlgTypeEnum.MZRAN, RngInitModeEnum.INIT_DEFAULT)
if sys.platform.lower() == 'darwin':
self.libname = find_file(self.SOURCE_ROOT, "std_enkf_debug.dylib")
lib_name = "std_enkf_debug.dylib"
else:
lib_name = "std_enkf_debug.so"
self.libname = find_file(self.SOURCE_ROOT, lib_name)
if self.libname:
self.module = AnalysisModule(lib_name = self.libname)
else:
self.libname = find_file(self.SOURCE_ROOT, "std_enkf_debug.so")
self.module = AnalysisModule(lib_name = self.libname)
pytest.skip('Debug library not found')


def toggleKey(self, key):
Expand Down

0 comments on commit c4cdbae

Please sign in to comment.