mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Issue #22777: Test pickling with all protocols.
This commit is contained in:
parent
79b81738ef
commit
bad1257c96
30 changed files with 701 additions and 621 deletions
|
|
@ -182,8 +182,9 @@ class TestPartialC(TestPartial, unittest.TestCase):
|
|||
def test_pickle(self):
|
||||
f = self.partial(signature, 'asdf', bar=True)
|
||||
f.add_something_to__dict__ = True
|
||||
f_copy = pickle.loads(pickle.dumps(f))
|
||||
self.assertEqual(signature(f), signature(f_copy))
|
||||
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|
||||
f_copy = pickle.loads(pickle.dumps(f, proto))
|
||||
self.assertEqual(signature(f), signature(f_copy))
|
||||
|
||||
# Issue 6083: Reference counting bug
|
||||
def test_setstate_refcount(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue