diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-15 12:02:43 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-15 12:02:43 (GMT) |
| commit | 655720e2758a15c85effb340ff65f4b93e7cc7a7 (patch) | |
| tree | d582731bc3e14a86222093e806d2ec88b2640f8f /Lib/test/test_functools.py | |
| parent | c3741a067b3443cdac7739b21e0cd1bacf155b02 (diff) | |
| download | cpython-655720e2758a15c85effb340ff65f4b93e7cc7a7.zip cpython-655720e2758a15c85effb340ff65f4b93e7cc7a7.tar.gz cpython-655720e2758a15c85effb340ff65f4b93e7cc7a7.tar.bz2 | |
Issue #22777: Test pickling with all protocols.
Diffstat (limited to 'Lib/test/test_functools.py')
| -rw-r--r-- | Lib/test/test_functools.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 445ad9e..c0a9a3b 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -146,8 +146,9 @@ class TestPartial(unittest.TestCase): def test_pickle(self): f = self.thetype(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): |
