[Stackless-checkins] r55161 - stackless/trunk/Stackless/unittests/test_exception.py stackless/trunk/Stackless/unittests/test_pickle.py
richard.tew
python-checkins at python.org
Sun May 6 22:52:54 CEST 2007
Author: richard.tew
Date: Sun May 6 22:52:54 2007
New Revision: 55161
Added:
stackless/trunk/Stackless/unittests/test_exception.py
- copied unchanged from r55160, stackless/branches/release25-maint/Stackless/unittests/test_exception.py
Modified:
stackless/trunk/Stackless/unittests/test_pickle.py
Log:
Ported Stackless release25-maint r55159, r55160. Added a test for the crasher where TaskletExit was incorrectly defined as to its exception type. It was fixed recently by Kristjan, but a test can't hurt.
Modified: stackless/trunk/Stackless/unittests/test_pickle.py
==============================================================================
--- stackless/trunk/Stackless/unittests/test_pickle.py (original)
+++ stackless/trunk/Stackless/unittests/test_pickle.py Sun May 6 22:52:54 2007
@@ -264,6 +264,32 @@
# Force the collection of the unpickled tasklet.
gc.collect()
+ def testSendSequence(self):
+ # Send sequence when pickled was not handled. It uses
+ # a custom cframe execute function which was not recognised
+ # by the pickling.
+ #
+ # Traceback (most recent call last):
+ # File ".\test_pickle.py", line 283, in testSendSequence
+ # pickle.dumps(t1)
+ # ValueError: frame exec function at 1e00bf40 is not registered!
+
+ def sender(chan):
+ l = [ 1, 2, 3, 4 ]
+ chan.send_sequence(l)
+
+ def receiver(chan):
+ length = 4
+ while length:
+ v = chan.receive()
+ length -= 1
+
+ c = stackless.channel()
+ t1 = stackless.tasklet(sender)(c)
+ t2 = stackless.tasklet(receiver)(c)
+ t1.run()
+
+ pickle.dumps(t1)
if __name__ == '__main__':
if not sys.argv[1:]:
_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins
More information about the Stackless-checkins
mailing list