[py-svn] r10863 - in py/dist/py/execnet: . testing

hpk at codespeak.net hpk at codespeak.net
Tue Apr 19 17:55:18 CEST 2005


Author: hpk
Date: Tue Apr 19 17:55:18 2005
New Revision: 10863

Modified:
   py/dist/py/execnet/channel.py
   py/dist/py/execnet/testing/test_gateway.py
Log:
extended callback test to work with sent channels as well. 



Modified: py/dist/py/execnet/channel.py
==============================================================================
--- py/dist/py/execnet/channel.py	(original)
+++ py/dist/py/execnet/channel.py	Tue Apr 19 17:55:18 2005
@@ -25,7 +25,6 @@
         self._receiver = receiver 
         self._items = Queue.Queue()
         self._closeevent = threading.Event()
-        #self._depchannel = []
 
     def __repr__(self):
         flag = self.isclosed() and "closed" or "open"

Modified: py/dist/py/execnet/testing/test_gateway.py
==============================================================================
--- py/dist/py/execnet/testing/test_gateway.py	(original)
+++ py/dist/py/execnet/testing/test_gateway.py	Tue Apr 19 17:55:18 2005
@@ -168,11 +168,12 @@
         self.gw.remote_exec(channel=channel, source='''
             channel.send(42)
             channel.send(13)
-            #channel.send(channel.gateway.newchannel())
+            channel.send(channel.gateway.newchannel())
             ''') 
         channel.waitclose(1.0) 
-        assert len(l)
-        assert l == [42,13]
+        assert len(l) == 3
+        assert l[:2] == [42,13]
+        assert isinstance(l[2], channel.__class__) 
 
     def test_remote_redirect_stdout(self): 
         out = py.std.StringIO.StringIO() 



More information about the pytest-commit mailing list