update pytest-xdist
This commit is contained in:
parent
5ad030d398
commit
eb8464ecaa
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue