Newer
Older
import unittest
from pathlib import Path
from packaging.version import Version
import pymagglobal
# Implicitly check the package index __all__
# Not a test-case since `import *` is only allowed at module level
from pymagglobal import *
class ParserTestPackage(unittest.TestCase):
'''Unit-tests for the package i.e. __init__.py'''
def test_version(self):
version = Version(pymagglobal.__version__)
def test_models(self):
'''Check if built-in model-files exist'''
with self.subTest(msg=model_fn):
self.assertTrue(Path(model_fn).is_file())