[py-svn] r57056 - py/branch/event/py/execnet/testing

hpk at codespeak.net hpk at codespeak.net
Thu Aug 7 12:35:28 CEST 2008


Author: hpk
Date: Thu Aug  7 12:35:27 2008
New Revision: 57056

Modified:
   py/branch/event/py/execnet/testing/test_gateway.py
Log:
teardown local gateway when remote is killed


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	Thu Aug  7 12:35:27 2008
@@ -476,18 +476,21 @@
 
 def test_channel_endmarker_remote_killterm():
     gw = py.execnet.PopenGateway()
-    from Queue import Queue
-    q = Queue()
-    channel = gw.remote_exec(source='''
-        import os
-        os.kill(os.getpid(), 15)
-    ''') 
-    channel.setcallback(q.put, endmarker=999)
-    val = q.get(TESTTIMEOUT)
-    assert val == 999
-    err = channel._getremoteerror()
-    py.test.skip("implement information on causes/signals "
-                 "remote gateways")
+    try:
+        from Queue import Queue
+        q = Queue()
+        channel = gw.remote_exec(source='''
+            import os
+            os.kill(os.getpid(), 15)
+        ''') 
+        channel.setcallback(q.put, endmarker=999)
+        val = q.get(TESTTIMEOUT)
+        assert val == 999
+        err = channel._getremoteerror()
+    finally:
+        gw.exit()
+    py.test.skip("provide information on causes/signals "
+                 "of dying remote gateways")
 
     
 #class TestBlockingIssues: 



More information about the pytest-commit mailing list