From b4541fd6f2c8994a2d22e9397514494bb8c5c62f Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Tue, 5 Mar 2002 14:01:28 +0000 Subject: 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. --- Lib/test/pickletester.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 1b58edb..e2d2580 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): -- cgit v0.12