mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
729765079e
commit
c0c9370985
2 changed files with 52 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue