Skip to content

Commit

Permalink
Merge pull request #168 from ubermag/test-debug-info
Browse files Browse the repository at this point in the history
tests: add test for debug_info function
  • Loading branch information
lang-m committed Oct 20, 2023
2 parents d65f4ed + e835221 commit e7f3921
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ubermag/tests/test_info.py
@@ -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

0 comments on commit e7f3921

Please sign in to comment.