Commit ebf9b8fa authored by Stephan Rave's avatar Stephan Rave
Browse files

[tests] add further test for config.require()

parent c84c64a1
Pipeline #113055 failed with stages
in 62 minutes and 49 seconds
......@@ -5,6 +5,7 @@
import pytest
from pymor.core.config import config, _PACKAGES
from pymor.core.exceptions import DependencyMissing
def test_repr():
......@@ -33,3 +34,9 @@ def test_require_numpy():
def test_require_fail_foo():
with pytest.raises(AttributeError):
config.require('FOO')
def test_require_fail_missing_dependency(monkeypatch):
monkeypatch.setitem(_PACKAGES, 'THISISNOTAPACKAGENAMETHATEXISTS', lambda: False)
with pytest.raises(DependencyMissing):
config.require('THISISNOTAPACKAGENAMETHATEXISTS')
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