diff options
Diffstat (limited to 'Lib/test/test_set.py')
| -rw-r--r-- | Lib/test/test_set.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 610be7c..dd65202 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -233,7 +233,7 @@ class TestJointOps(unittest.TestCase): self.assertEqual(self.s, dup, "%s != %s" % (self.s, dup)) if type(self.s) not in (set, frozenset): self.s.x = 10 - p = pickle.dumps(self.s) + p = pickle.dumps(self.s, i) dup = pickle.loads(p) self.assertEqual(self.s.x, dup.x) @@ -786,10 +786,11 @@ class TestBasicOps(unittest.TestCase): self.assertEqual(setiter.__length_hint__(), len(self.set)) 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)) #------------------------------------------------------------------------------ |
