Issue #4740: Use HIGHEST_PROTOCOL in pickle test. This enables test for protocol 3
(== HIGHEST_PROTOCOL in 3.x)
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 07319fc..da3ed0f 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -219,7 +219,7 @@
self.failIf(set('cbs').issuperset('a'))
def test_pickling(self):
- for i in (0, 1, 2):
+ for i in range(pickle.HIGHEST_PROTOCOL + 1):
p = pickle.dumps(self.s, i)
dup = pickle.loads(p)
self.assertEqual(self.s, dup, "%s != %s" % (self.s, dup))