[Python-checkins] CVS: python/dist/src/Lib/test pickletester.py,1.12,1.13
Michael Hudson
mwh@users.sourceforge.net
Tue, 05 Mar 2002 05:28:00 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv27068/Lib/test
Modified Files:
pickletester.py
Log Message:
A fix & test for
[ 496873 ] structseqs unpicklable
by adding a __reduce__ method to structseqs.
Will also commit this to the 2.2.1 branch momentarily.
Index: pickletester.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/pickletester.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** pickletester.py 19 Dec 2001 16:58:54 -0000 1.12
--- pickletester.py 5 Mar 2002 13:27:58 -0000 1.13
***************
*** 249,252 ****
--- 249,259 ----
self.assertEqual(a.__class__, b.__class__)
+ def test_structseq(self):
+ import time
+ t = time.localtime()
+ s = self.dumps(t)
+ u = self.loads(s)
+ self.assertEqual(t, u)
+
class AbstractPickleModuleTests(unittest.TestCase):