summaryrefslogtreecommitdiffstats
path: root/Lib/test/pickletester.py
Commit message (Collapse)AuthorAgeFilesLines
* pickle.py, load_int(): Match cPickle's just-repaired ability to unpickleTim Peters2001-08-281-0/+15
| | | | | | | | 64-bit INTs on 32-bit boxes (where they become longs). Also exploit that int(str) and long(str) will ignore a trailing newline (saves creating a new string at the Python level). pickletester.py: Simulate reading a pickle produced by a 64-bit box.
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-171-2/+6
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
* Change the test data to ask for class C from module __main__ ratherGuido van Rossum2001-04-161-2/+3
| | | | | | than from module pickletester. Using the latter turned out to cause the test to break when invoked as "import test.test_pickle" or "import test.autotest".
* Test full range of native ints. This exposes two more binary pickleTim Peters2001-04-101-0/+19
| | | | | | | | | bugs on sizeof(long)==8 machines. pickle.py has no idea what it's doing with very large ints, and variously gets things right by accident, computes nonsense, or generates corrupt pickles. cPickle fails on cases 2**31 <= i < 2**32: since it *thinks* those are 4-byte ints (the "high 4 bytes" are all zeroes), it stores them in the (signed!) BININT format, so they get unpickled as negative values.
* Pickles have a number of storage formats for various sizes and kinds ofTim Peters2001-04-091-13/+40
| | | | | | | | | integers, but the std tests don't exercise most of them. Repair that. CAUTION: I expect this to fail on boxes with sizeof(long)==8, in the part of test_cpickle (but not test_pickle) trying to do a binary mode (not text mode) load of the embedded BINDATA pickle string. Once that hypothesized failure is confirmed, I'll fix cPickle.c.
* No functional change -- just added whitespace in places so I could followTim Peters2001-04-091-11/+30
| | | | the logic better. Will be adding some additional tests later today.
* Typo repair.Tim Peters2001-01-221-1/+1
|
* Reorganize pickle/cPickle testing so the tests pass regardless of the orderTim Peters2001-01-221-0/+153
they're run.