Skip to content
Snippets Groups Projects
run_tests.py 498 B
Newer Older
import unittest
import doctest
from pathlib import PurePath

from pymagglobal import utils
from pymagglobal import _commands

tests_path = PurePath(__file__).parent
print(tests_path)
# By convention discovers TestCases in test_*.py
suite = unittest.TestLoader().discover(tests_path)

# Add doc-test manually
suite.addTest(doctest.DocTestSuite(utils))
suite.addTest(doctest.DocTestSuite(_commands))

if __name__ == '__main__':
    runner = unittest.TextTestRunner(verbosity=2)
    runner.run(suite)