--reruns=2 pytest 失败后再试一次的参数
#下载包 清华镜像 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pytest-rerunfailures
# D:\pythonProject0726\test_case\all_test_case.py import pytest import xdist if __name__ == '__main__': pytest.main(['-vs','-n=2','--reruns=2'])