summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-03-05 13:27:58 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-03-05 13:27:58 (GMT)
commit7bb466a1a534e73de11bb044f6910aaf86d78473 (patch)
tree49119dd5b9644a62143e7b776dc378bcadb32d8f /Lib/test
parent58fb23794876c6b58fc3dc75e2a2b420b458d575 (diff)
downloadcpython-7bb466a1a534e73de11bb044f6910aaf86d78473.zip
cpython-7bb466a1a534e73de11bb044f6910aaf86d78473.tar.gz
cpython-7bb466a1a534e73de11bb044f6910aaf86d78473.tar.bz2
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.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/pickletester.py7
1 files changed, 7 insertions, 0 deletions
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):