[py-svn] r57265 - in py/branch/event/py/test2/dsession: . testing

hpk at codespeak.net hpk at codespeak.net
Fri Aug 15 11:42:48 CEST 2008


Author: hpk
Date: Fri Aug 15 11:42:45 2008
New Revision: 57265

Modified:
   py/branch/event/py/test2/dsession/mypickle.py
   py/branch/event/py/test2/dsession/testing/test_mypickle.py
Log:
* python2.4 compatibility 
* eliminate potential race condition


Modified: py/branch/event/py/test2/dsession/mypickle.py
==============================================================================
--- py/branch/event/py/test2/dsession/mypickle.py	(original)
+++ py/branch/event/py/test2/dsession/mypickle.py	Fri Aug 15 11:42:45 2008
@@ -99,7 +99,7 @@
     """ Problems while unpickling. """
     def __init__(self, formatted):
         self.formatted = formatted
-        super(UnpickleError, self).__init__(formatted)
+        Exception.__init__(self, formatted)
     def __str__(self):
         return self.formatted
 

Modified: py/branch/event/py/test2/dsession/testing/test_mypickle.py
==============================================================================
--- py/branch/event/py/test2/dsession/testing/test_mypickle.py	(original)
+++ py/branch/event/py/test2/dsession/testing/test_mypickle.py	Fri Aug 15 11:42:45 2008
@@ -173,13 +173,13 @@
             channel = PickleChannel(channel)
             from py.__.test2.dsession.testing.test_mypickle import A
             a1 = A()
-            channel.receive()
+            channel.send(a1)
             channel.send(a1)
         """)
         channel = PickleChannel(channel)
         queue = py.std.Queue.Queue()
-        channel.send("start")
-        del channel._ipickle._unpicklememo
+        a = channel.receive()
+        channel._ipickle._unpicklememo.clear()
         channel.setcallback(queue.put, endmarker=-1)
         next = queue.get(timeout=TESTTIMEOUT)
         assert next == -1 



More information about the pytest-commit mailing list