summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_functools.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_functools.py')
-rw-r--r--Lib/test/test_functools.py5
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):