2010-02-01 119 views
2

我愛py.test,並試圖讓遠程測試執行功能正常工作,以便我可以在遠程計算機上運行測試。文檔非常少,我對此感到沮喪。任何幫助搞清楚我做錯了什麼是值得讚賞的。這裏是主要的服務器上我的命令行:使用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 

回答

1

你可以嘗試重新運行最新版本的pytest和pytest-xdist嗎?