summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sets.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_sets.py')
-rw-r--r--Lib/test/test_sets.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py
index 319bdcb..0a89908 100644
--- a/Lib/test/test_sets.py
+++ b/Lib/test/test_sets.py
@@ -75,10 +75,11 @@ class TestBasicOps(unittest.TestCase):
self.assertIn(v, self.values)
def test_pickling(self):
- p = pickle.dumps(self.set)
- copy = pickle.loads(p)
- self.assertEqual(self.set, copy,
- "%s != %s" % (self.set, copy))
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ p = pickle.dumps(self.set, proto)
+ copy = pickle.loads(p)
+ self.assertEqual(self.set, copy,
+ "%s != %s" % (self.set, copy))
#------------------------------------------------------------------------------