Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from ubermag/test-debug-info
tests: add test for debug_info function
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import re | ||
|
||
import ubermag | ||
|
||
|
||
def test_debug_info(): | ||
info = ubermag.debug_info() | ||
|
||
assert "Python: 3." in info | ||
|
||
for pkg in [ | ||
"ubermagutil", | ||
"discretisedfield", | ||
"ubermagtable", | ||
"micromagneticmodel", | ||
"micromagneticdata", | ||
"micromagnetictests", | ||
"mumax3c", | ||
"oommfc", | ||
"mag2exp", | ||
]: | ||
# test that all packages are listed with some version number | ||
assert re.findall(rf"{pkg}: [0-9.]+", info) | ||
|
||
assert f"ubermag: {ubermag.__version__}" in info | ||
|
||
# OOMMF is automatically installed so we can expect to find a Runner | ||
assert "OOMMFRunner" in info |