我有带有环境的 Ubuntu 主机:Python 3.6.9、pytest-4.6.9、execnet 1.7.1、x-dist 1.31.0
和 Windows 主机:Windows 版本 10.0.19041.508、python 3.7.5、pytest 5.4.1、execnet 1.7.1
我想在 Ubuntu 上使用 x-dist 插件在 Windows 主机上运行测试: pytest -v -d --tx ssh=admin@10.15.20.15 --rsyncdir /etc/ansible/autotests/release C:\users\Public\ test_create_session.py
我收到错误:
============================= test session starts =============================
platform linux -- Python 3.6.9, pytest-4.6.9, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /etc/ansible/autotests/release
plugins: teamcity-messages-1.27, xdist-1.31.0, forked-1.1.3
gw0 I�� 㤠���� �믮����� 㪠������ �ணࠬ��.
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/_pytest/main.py", line 204, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "/home/test/.local/lib/python3.6/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/home/test/.local/lib/python3.6/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/test/.local/lib/python3.6/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/home/test/.local/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/home/test/.local/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/test/.local/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/xdist/dsession.py", line 78, in pytest_sessionstart
INTERNALERROR> nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/xdist/workermanage.py", line 64, in setup_nodes
INTERNALERROR> nodes.append(self.setup_node(spec, putevent))
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/xdist/workermanage.py", line 68, in setup_node
INTERNALERROR> gw = self.group.makegateway(spec)
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/execnet/multi.py", line 111, in makegateway
INTERNALERROR> """)
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/execnet/gateway.py", line 119, in remote_exec
INTERNALERROR> gateway_base.dumps_internal((source, call_name, kwargs)))
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/execnet/gateway_base.py", line 710, in _send
INTERNALERROR> message.to_io(self._io)
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/execnet/gateway_base.py", line 130, in to_io
INTERNALERROR> io.write(header+self.data)
INTERNALERROR> File "/usr/local/lib/python3.6/dist-packages/execnet/gateway_base.py", line 101, in write
INTERNALERROR> self.outfile.flush()
INTERNALERROR> BrokenPipeError: [Errno 32] Broken pipe
当我在其他 Windows 主机上运行相同的测试时,一切正常,没有错误。我认为这个 Windows 主机的响应带有一些意想不到的东西,但我无法理解是什么问题。有谁能够帮助我?