mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
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:
parent
58fb237948
commit
7bb466a1a5
2 changed files with 37 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue