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 1b58edb..e2d2580 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -248,6 +248,13 @@
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):