Unverified Commit aa1001aa authored by Peter Oehme's avatar Peter Oehme Committed by René Fritze
Browse files

Use pymor's exception instead of ImportError

parent 32310893
......@@ -16,6 +16,7 @@ from pytest import skip, fail
from pymor.algorithms.basic import almost_equal, relative_error
from pymor.core.config import config
from pymor.core.exceptions import DependencyMissing
def runmodule(filename):
......@@ -103,13 +104,12 @@ def skip_if_missing(module_name):
def _inner_wrapper(*args, **kwargs):
except ImportError as ie:
except DependencyMissing as dm:
if not os.environ.get('DOCKER_PYMOR', False):
skip_string = 'skipped test due to missing dependency ' + module_name
fail_string = 'failed test due to missing dependency ' + module_name
func(*args, **kwargs)
return _inner_wrapper
return _outer_wrapper
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment