摘要:
使用pytest.raises来进行对异常的测试 import pytest def test_error(): with pytest.raises(ZeroDivisionError): 1 / 0 阅读全文
posted @ 2020-12-09 15:48
algxbi
阅读(301)
评论(0)
推荐(0)
摘要:
安装pytest-xdist包 pip3 install pytest-xdist 使用方法 pytest -n NUM NUM 为进程数目, 你的电脑是几核的就可以使用最大数量的核来进行运算, 比如我的电脑是六核的,NUM就可以设定为6. 康康效果 #使用前 28 passed in 26.15s 阅读全文
posted @ 2020-12-09 14:26
algxbi
阅读(519)
评论(0)
推荐(0)

浙公网安备 33010602011771号