Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pyMOR
pymor
Commits
bf4e3edd
Commit
bf4e3edd
authored
Jan 11, 2022
by
Stephan Rave
Browse files
[tests] add minimal tests for config.require()
parent
34a0fb91
Pipeline
#113026
failed with stages
in 72 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/pymortests/core/config.py
View file @
bf4e3edd
...
...
@@ -2,6 +2,7 @@
# Copyright 2013-2021 pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause)
import
pytest
from
pymor.core.config
import
config
,
_PACKAGES
...
...
@@ -22,3 +23,13 @@ def test_dir():
for
p
in
_PACKAGES
:
assert
'HAVE_'
+
p
in
d
assert
p
+
'_VERSION'
in
d
def
test_require_numpy
():
config
.
require
(
'numpy'
)
config
.
require
(
'NUMPY'
)
def
test_require_fail_foo
():
with
pytest
.
raises
(
AttributeError
):
config
.
require
(
'FOO'
)
René Fritze
@r_milk01
mentioned in commit
52a7bc05
·
Jan 11, 2022
mentioned in commit
52a7bc05
mentioned in commit 52a7bc05788845d94c2e74578b0c25deb97cf3c0
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment