def main(args=None):
"""
Called with ``python -m lazyutils.tests``: run main test suite.
"""
parser = get_parser()
args = parser.parse_args(args)
# Check if pytest is available
try:
import pytest
except ImportError:
raise SystemExit(
'You need py.test to run the test suite.\n'
'You can install it using your distribution package manager or\n'
' $ python -m pip install pytest --user'
)
# Get data from test_module
import lazyutils.tests as test_module
test_path = os.path.abspath(os.path.dirname(test_module.__file__))
pytest.main([test_path, '-m', 'not documentation'])
评论列表
文章目录