summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-02-13 15:44:41 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-02-13 15:44:41 (GMT)
commit8587b3c0730236dc007e8533c3cbfccd421fa381 (patch)
treee031741700152eb780af1071669c69f397402429 /Lib/test/pickletester.py
parentfe62bc917d1ab51fc591839b3c65589b268cad31 (diff)
downloadcpython-8587b3c0730236dc007e8533c3cbfccd421fa381.zip
cpython-8587b3c0730236dc007e8533c3cbfccd421fa381.tar.gz
cpython-8587b3c0730236dc007e8533c3cbfccd421fa381.tar.bz2
Added a HIGHEST_PROTOCOL module attribute to pickle and cPickle.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 734f2a3..8479d43 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1,5 +1,6 @@
import unittest
import pickle
+import cPickle
import pickletools
import copy_reg
@@ -7,8 +8,9 @@ from test.test_support import TestFailed, have_unicode, TESTFN
# Tests that try a number of pickle protocols should have a
# for proto in protocols:
-# kind of outer loop. Bump the 3 to 4 if/when protocol 3 is invented.
-protocols = range(3)
+# kind of outer loop.
+assert pickle.HIGHEST_PROTOCOL == cPickle.HIGHEST_PROTOCOL == 2
+protocols = range(pickle.HIGHEST_PROTOCOL + 1)
# Return True if opcode code appears in the pickle, else False.