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 
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', )
INTERNALERROR> assert not 'testcase/interface_testcase/test_onepage.py::TestOne::test_num_007'

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

进程已结束,退出代码 0

解决方法:

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

pytest分布式运行时报错INTERNALERROR> AssertionError_第1张图片

 

你可能感兴趣的:(python,pycharm,开发语言)