[svn r58385] * move cross-platform process kill functionality and move it to

py.process.kill(pid)
* simplify test_auth.py
* use new functionality from some tests

--HG--
branch : trunk
This commit is contained in:
hpk
2008-09-23 16:28:13 +02:00
parent 5b21c540b6
commit a55332091d
7 changed files with 179 additions and 209 deletions

View File

@@ -516,8 +516,6 @@ class TestPopenGateway(PopenGatewayTestSetup, BasicRemoteExecution):
def test_waitclose_on_remote_killed(self):
py.test.skip("fix needed: dying remote process does not cause waitclose() to fail")
if not hasattr(py.std.os, 'kill'):
py.test.skip("no os.kill")
gw = py.execnet.PopenGateway()
channel = gw.remote_exec("""
import os
@@ -527,7 +525,7 @@ class TestPopenGateway(PopenGatewayTestSetup, BasicRemoteExecution):
channel.send("#" * 100)
""")
remotepid = channel.receive()
os.kill(remotepid, 9)
py.process.kill(remotepid)
py.test.raises(channel.RemoteError, "channel.waitclose(TESTTIMEOUT)")
py.test.raises(EOFError, channel.send, None)
py.test.raises(EOFError, channel.receive)