Issue 5665: add more pickling tests.

- Add tests for the module-level load() and dump() functions.
- Add tests for cPickle's internal data structures, stressing workloads
with many gets/puts.
- Add tests for the Pickler and Unpickler classes, in particular the
memo attribute.
- test_xpickle is extended to test backwards compatibility with Python
2.4, 2.5 and 2.6 by round-tripping pickled objects through a worker
process. This is guarded with a regrtest -u xpickle resource.
This commit is contained in:
Collin Winter 2009-04-09 16:46:46 +00:00
parent 5963185b23
commit f8089c7789
5 changed files with 428 additions and 21 deletions

View file

@ -122,6 +122,10 @@ resources to test. Currently only the following are defined:
gui - Run tests that require a running GUI.
xpickle - Test pickle and cPickle against Python 2.4, 2.5 and 2.6 to
test backwards compatibility. These tests take a long time
to run.
To enable all resources except one, use '-uall,-<resource>'. For
example, to run all the tests except for the bsddb tests, give the
option '-uall,-bsddb'.
@ -175,7 +179,8 @@ if sys.platform == 'darwin':
from test import test_support
RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb',
'decimal', 'compiler', 'subprocess', 'urlfetch', 'gui')
'decimal', 'compiler', 'subprocess', 'urlfetch', 'gui',
'xpickle')
def usage(code, msg=''):