def run_tests(self):
import coverage
import pytest
if self.pytest_args and len(self.pytest_args) > 0:
self.test_args.extend(self.pytest_args.strip().split(' '))
self.test_args.append('tests/')
cov = coverage.Coverage()
cov.start()
errno = pytest.main(self.test_args)
cov.stop()
cov.report()
cov.html_report()
print("Wrote coverage report to htmlcov directory")
sys.exit(errno)
评论列表
文章目录