2

我喜欢 py.test 并试图让远程测试执行功能正常工作,这样我就可以在远程机器上运行测试。文档很少,我对此感到沮丧。感谢任何帮助找出我做错了什么。这是我在主服务器上的命令行:

c:\Python26\Scripts\py.test --dist=each --tx socket=192.168.1.11:8888 tests\test_guest_install.py

如果我正确阅读了文档,这应该将脚本推送到远程机器并运行它。这是另一边的输出:

C:\Users\Dave\Desktop>c:\Python26\python.exe socketserver.py
socket_readline_exec_server-1.2 Entering Accept loop ('0.0.0.0', 8888)
socket_readline_exec_server-1.2 got new connection from 192.168.1.5 30856
reading line
socket_readline_exec_server-1.2 compiled source, executing
============================= test session starts =============================
python: platform win32 -- Python 2.6.4 -- pytest-1.2.0
test object 1: C:\Users\Alan\Desktop\pyexecnetcache

==============================  in 0.14 seconds ===============================
socket_readline_exec_server-1.2 finished executing code
leaving socketserver execloop
Traceback (most recent call last):
  File "socketserver.py", line 90, in <module>
    startserver(serversock, loop=False)
  File "socketserver.py", line 81, in startserver
    serversock.shutdown(2)
  File "<string>", line 1, in shutdown
socket.error: [Errno 10057] A request to send or receive data was disallowed be
ause the socket is not connected and (when sending on a datagram socket using a
sendto call) no address was supplied
4

1 回答 1

0

您可以尝试使用最新版本的 pytest 和 pytest-xdist 重新运行吗?

于 2010-07-15T09:05:08.167 回答