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

hpk at codespeak.net hpk at codespeak.net
Sat Aug 2 12:35:42 CEST 2008


Author: hpk
Date: Sat Aug  2 12:35:42 2008
New Revision: 56917

Modified:
   py/branch/event/py/execnet/testing/test_gateway.py
Log:
add identity test for pickling


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	Sat Aug  2 12:35:42 2008
@@ -397,6 +397,16 @@
         assert newl == l1 + l1
         assert isl == True
 
+    def test_pickling_identity(self):
+        channel = self.gw.remote_exec("""
+            channel.send(channel.receive())
+        """, _pickle=True)
+        l1 = ['hello']
+        channel.send(l1)
+        l2 = channel.receive()
+        assert l1 == l2
+        assert l1 is not l2
+
     def test_confusion_from_os_write_stdout(self):
         channel = self.gw.remote_exec("""
             import os



More information about the pytest-commit mailing list