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.
This commit is contained in:
Michael W. Hudson 2002-03-05 13:27:58 +00:00
parent 58fb237948
commit 7bb466a1a5
2 changed files with 37 additions and 1 deletions

View file

@ -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):