nopaque/app/tests/cli.py

10 lines
267 B
Python
Raw Normal View History

2023-05-11 14:33:21 +00:00
from unittest import TestLoader, TextTestRunner
from unittest.suite import TestSuite
from . import bp
@bp.cli.command('run')
def run_test():
''' Run unit tests. '''
tests: TestSuite = TestLoader().discover('tests')
TextTestRunner(verbosity=2).run(tests)