代码拉取完成,页面将自动刷新
#@+leo-ver=5-thin
#@+node:ekr.20181014073705.1: * @file ../../run_pytest_tests.py
import sys
import pytest
path = sys.argv[-1]
args = [
'--quiet',
# '--setup-plan',
# '-x', # Exit on first error.
path, # File or directory
]
ignore_paths = []
for ignore_path in ignore_paths:
args.append(ignore_path)
result = pytest.main(args)
result_kinds = [
'All tests were collected and passed successfully',
'Tests were collected and run but some of the tests failed',
'Test execution was interrupted by the user',
'Internal error happened while executing tests',
'pytest command line usage error',
'No tests were collected',
]
message = f"{path}: {result}:{result_kinds[result]}"
if result == 5:
sys.stdout.write(message)
sys.stdout.flush()
if result not in (1, 5):
sys.stderr.write(message)
sys.stdout.flush()
#@-leo
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。