summaryrefslogtreecommitdiff
path: root/Lib/test/test_bool.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_bool.py')
-rw-r--r--Lib/test/test_bool.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py
index 4bab28be77..250743949b 100644
--- a/Lib/test/test_bool.py
+++ b/Lib/test/test_bool.py
@@ -269,10 +269,9 @@ class BoolTest(unittest.TestCase):
def test_pickle(self):
import pickle
- self.assertIs(pickle.loads(pickle.dumps(True)), True)
- self.assertIs(pickle.loads(pickle.dumps(False)), False)
- self.assertIs(pickle.loads(pickle.dumps(True, True)), True)
- self.assertIs(pickle.loads(pickle.dumps(False, True)), False)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ self.assertIs(pickle.loads(pickle.dumps(True, proto)), True)
+ self.assertIs(pickle.loads(pickle.dumps(False, proto)), False)
def test_picklevalues(self):
# Test for specific backwards-compatible pickle values