From: Michael W. Hudson Date: Tue, 5 Mar 2002 14:01:28 +0000 (+0000) Subject: backport my checkin of X-Git-Tag: v2.2.1c1~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4541fd6f2c8994a2d22e9397514494bb8c5c62f;p=thirdparty%2FPython%2Fcpython.git backport my checkin of revision 1.13 of pickletester.py 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. --- diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 1b58edb9e461..e2d2580b8e5d 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -248,6 +248,13 @@ class AbstractPickleTests(unittest.TestCase): b = self.loads(s) 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): def test_dump_closed_file(self):