[py-svn] r57206 - py/branch/event/py/execnet/testing
hpk at codespeak.net
hpk at codespeak.net
Tue Aug 12 17:44:02 CEST 2008
Author: hpk
Date: Tue Aug 12 17:43:59 2008
New Revision: 57206
Modified:
py/branch/event/py/execnet/testing/test_gateway.py
Log:
refine skipped test
Modified: py/branch/event/py/execnet/testing/test_gateway.py
==============================================================================
--- py/branch/event/py/execnet/testing/test_gateway.py (original)
+++ py/branch/event/py/execnet/testing/test_gateway.py Tue Aug 12 17:43:59 2008
@@ -511,7 +511,7 @@
ret = channel.receive()
assert ret == 42
- def test_remote_is_killed_while_sending(self):
+ 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")
@@ -521,16 +521,13 @@
import time
channel.send(os.getpid())
while 1:
- channel.send('#'*1000)
- time.sleep(10)
+ channel.send("#" * 100)
""")
- remote = channel.receive()
- time.sleep(0.2)
- os.kill(remote, 9)
- # the following things should crash, but don't
- # currently
- channel.waitclose(TESTTIMEOUT)
+ remotepid = channel.receive()
+ os.kill(remotepid, 9)
+ py.test.raises(channel.RemoteError, "channel.waitclose(TESTTIMEOUT)")
py.test.raises(EOFError, channel.send, None)
+ py.test.raises(EOFError, channel.receive)
def test_endmarker_delivery_on_remote_killterm():
if not hasattr(py.std.os, 'kill'):
More information about the pytest-commit
mailing list