Commit Graph

10 Commits

Author SHA1 Message Date
Tim Peters e0c446bb4a Whitespace normalization. 2001-10-18 21:57:37 +00:00
Jeremy Hylton 6642653875 Covert pickle tests to use unittest.
Extend tests to cover a few more cases.  For cPickle, test several of
the undocumented features.
2001-10-15 21:38:56 +00:00
Tim Peters 19ef62d5a9 pickle.py, load_int(): Match cPickle's just-repaired ability to unpickle
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.
2001-08-28 22:21:18 +00:00
Martin v. Löwis 339d0f720e Patch #445762: Support --disable-unicode
- 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.
2001-08-17 18:39:25 +00:00
Guido van Rossum 42f92da307 Change the test data to ask for class C from module __main__ rather
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".
2001-04-16 00:28:21 +00:00
Tim Peters e089c68871 Test full range of native ints. This exposes two more binary pickle
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.
2001-04-10 03:41:41 +00:00
Tim Peters 461922a005 Pickles have a number of storage formats for various sizes and kinds of
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.
2001-04-09 20:07:05 +00:00
Tim Peters c58440fcef No functional change -- just added whitespace in places so I could follow
the logic better.  Will be adding some additional tests later today.
2001-04-09 17:16:31 +00:00
Tim Peters 763cb0aa44 Typo repair. 2001-01-22 22:43:35 +00:00
Tim Peters e935816164 Reorganize pickle/cPickle testing so the tests pass regardless of the order
they're run.
2001-01-22 22:05:20 +00:00