summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-02-13 19:30:57 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-02-13 19:30:57 (GMT)
commitc0c9370985f393436013eb70d724d7ff1e69c74d (patch)
treed0d6859350696cacc6b7db87bf10e782663ba0ee /Lib/test/pickletester.py
parent729765079e342536a094fd447e81812755760cd3 (diff)
downloadcpython-c0c9370985f393436013eb70d724d7ff1e69c74d.zip
cpython-c0c9370985f393436013eb70d724d7ff1e69c74d.tar.gz
cpython-c0c9370985f393436013eb70d724d7ff1e69c74d.tar.bz2
We didn't have any tests making pickles with one of {pickle, cPickle},
and loading them via the other, except for the special cases of this Guido added to test_datetime.py for datetime module objects. The new test_xpickle.py tries all of pickletester's AbstractPickleTests in both x-module ways.
Diffstat (limited to 'Lib/test/pickletester.py')
-rw-r--r--Lib/test/pickletester.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index c6ffbea..e1a333b 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -806,6 +806,11 @@ class AbstractPickleModuleTests(unittest.TestCase):
finally:
os.remove(TESTFN)
+ def test_highest_protocol(self):
+ # Of course this needs to be changed when HIGHEST_PROTOCOL changes.
+ self.assertEqual(self.module.HIGHEST_PROTOCOL, 2)
+
+
class AbstractPersistentPicklerTests(unittest.TestCase):
# This class defines persistent_id() and persistent_load()