pytest分布式运行时报错INTERNALERROR> AssertionError

报错信息如下:

D:\Anaconda3\python.exe "D:/study program/install/PyCharm 2020.1/workspace/requestsOne/marry_pytest/pytest.main.py"
============================= test session starts =============================
platform win32 -- Python 3.8.5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- D:\Anaconda3\python.exe
cachedir: .pytest_cache
metadata: {'Python': '3.8.5', 'Platform': 'Windows-10-10.0.19041-SP0', 'Packages': {'pytest': '5.4.3', 'py': '1.9.0', 'pluggy': '0.13.1'}, 'Plugins': {'allure-pytest': '2.8.18', 'forked': '1.3.0', 'html': '2.1.1', 'metadata': '1.11.0', 'ordering': '0.6', 'rerunfailures': '9.1.1', 'xdist': '2.1.0'}, 'JAVA_HOME': 'D:\\study program\\install\\Java\\jdk1.8.0_181'}
rootdir: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest, inifile: pytest.ini, testpaths: ./testcase
plugins: allure-pytest-2.8.18, forked-1.3.0, html-2.1.1, metadata-1.11.0, ordering-0.6, rerunfailures-9.1.1, xdist-2.1.0
gw0 I / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I
[gw0] win32 Python 3.8.5 cwd: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest
[gw1] win32 Python 3.8.5 cwd: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest
[gw2] win32 Python 3.8.5 cwd: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest
[gw3] win32 Python 3.8.5 cwd: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest
[gw4] win32 Python 3.8.5 cwd: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest
[gw5] win32 Python 3.8.5 cwd: D:\study program\install\PyCharm 2020.1\workspace\requestsOne\marry_pytest
[gw0] Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
[gw1] Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
[gw2] Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
[gw3] Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
[gw4] Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
[gw5] Python 3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
gw0 [9] / gw1 [9] / gw2 [9] / gw3 [9] / gw4 [9] / gw5 [9]

scheduling tests via LoadScheduling
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\_pytest\main.py", line 191, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\_pytest\main.py", line 247, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\pluggy\hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\pluggy\manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\pluggy\manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\xdist\dsession.py", line 112, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\xdist\dsession.py", line 135, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "D:\Anaconda3\lib\site-packages\xdist\dsession.py", line 174, in worker_workerfinished
INTERNALERROR>     assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('testcase/interface_testcase/test_onepage.py::TestOne::test_num_007', <WorkerController gw5>)
INTERNALERROR> assert not 'testcase/interface_testcase/test_onepage.py::TestOne::test_num_007'

============================ no tests ran in 4.19s ============================

进程已结束,退出代码 0

解决方法:

升级或者重新下载pytest-xdist包即可解决问题。

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值