update pytest-xdist

This commit is contained in:
yanchunhuo 2019-12-04 14:31:19 +08:00
parent 5ad030d398
commit eb8464ecaa
3 changed files with 30 additions and 21 deletions

View File

@ -29,14 +29,17 @@ if __name__=='__main__':
pytest_execute_params.append('-k')
pytest_execute_params.append(args.keyword)
# 判断是否输出日志
if "1"==args.capture:
if args.capture:
if int(args.capture):
pytest_execute_params.append('-s')
# 判断是否失败重跑
if not "0"==args.reruns:
if args.reruns:
if int(args.reruns):
pytest_execute_params.append('--reruns')
pytest_execute_params.append(args.reruns)
# 判断是否只运行上一次失败的用例
if "1"==args.lf:
if args.lf:
if int(args.lf):
pytest_execute_params.append('--lf')
pytest_execute_params.append(dir)

View File

@ -72,14 +72,17 @@ if __name__=='__main__':
pytest_execute_params.append('-k')
pytest_execute_params.append(args.keyword)
# 判断是否输出日志
if "1"==args.capture:
if args.capture:
if int(args.capture):
pytest_execute_params.append('-s')
# 判断是否失败重跑
if not "0"==args.reruns:
if args.reruns:
if int(args.reruns):
pytest_execute_params.append('--reruns')
pytest_execute_params.append(args.reruns)
# 判断是否只运行上一次失败的用例
if "1"==args.lf:
if args.lf:
if int(args.lf):
pytest_execute_params.append('--lf')
pytest_execute_params.append(dir)
exit_code = pytest.main(pytest_execute_params)

View File

@ -56,14 +56,17 @@ if __name__=='__main__':
pytest_execute_params.append('-k')
pytest_execute_params.append(args.keyword)
# 判断是否输出日志
if "1"==args.capture:
if args.capture:
if int(args.capture):
pytest_execute_params.append('-s')
# 判断是否失败重跑
if not "0"==args.reruns:
if args.reruns:
if int(args.reruns):
pytest_execute_params.append('--reruns')
pytest_execute_params.append(args.reruns)
# 判断是否只运行上一次失败的用例
if "1"==args.lf:
if args.lf:
if int(args.lf):
pytest_execute_params.append('--lf')
pytest_execute_params.append(dir)
tmp_exit_code = pytest.main(pytest_execute_params)