summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pickle.py
Commit message (Collapse)AuthorAgeFilesLines
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-6/+5
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* cPickle.c, load_build(): Taught cPickle how to pick apartTim Peters2003-02-151-2/+1
| | | | | | | | | | | | | | | | | | the optional proto 2 slot state. pickle.py, load_build(): CAUTION: Noted that cPickle's load_build and pickle's load_build really don't do the same things with the state, and didn't before this patch either. cPickle never tries to do .update(), and has no backoff if instance.__dict__ can't be retrieved. There are no tests that can tell the difference, and part of what cPickle's load_build() did looked accidental to me, so I don't know what the true intent is here. pickletester.py, test_pickle.py: Got rid of the hack for exempting cPickle from running some of the proto 2 tests. dictobject.c, PyDict_Next(): documented intended use.
* pickle.py has a few doctest'ed internal functions, so run their tests.Tim Peters2003-01-301-0/+1
|
* Implement appropriate __getnewargs__ for all immutable subclassable builtinGuido van Rossum2003-01-291-5/+13
| | | | | | | | types. The special handling for these can now be removed from save_newobj(). Add some testing for this. Also add support for setting the 'fast' flag on the Python Pickler class, which suppresses use of the memo.
* Temporary hacks to arrange that the pickle tests relying on protocol 2Tim Peters2003-01-281-3/+7
| | | | | | only get run by test_pickle.py now (& not by test_cpickle.py). This should be undone when protocol 2 is implemented in cPickle too. test_cpickle should pass again.
* Rename 'bin' arg to 'proto'. Keep the default at 0 lest the testsGuido van Rossum2003-01-281-4/+4
| | | | change in meaning.
* Remove inst_persistent_id() WANNI (we ain't never needed it).Jeremy Hylton2002-11-131-1/+23
| | | | Add some simple tests of the persistence hooks.
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-1/+1
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Fix the test control support for the pickle & cPickle tests so the tests runFred Drake2001-12-191-3/+10
| | | | under regrtest.
* Whitespace normalization.Tim Peters2001-10-181-1/+1
|
* Covert pickle tests to use unittest.Jeremy Hylton2001-10-151-2/+32
| | | | | Extend tests to cover a few more cases. For cPickle, test several of the undocumented features.
* Reorganize pickle/cPickle testing so the tests pass regardless of the orderTim Peters2001-01-221-154/+2
| | | | they're run.
* Test some Unicode pickling endcases.Guido van Rossum2000-12-191-0/+12
|
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-1/+1
|
* - plug a memory leak due to circular listsNeil Schemenauer2000-09-221-0/+3
|
* Fix Bug #114293:Jeremy Hylton2000-09-151-7/+72
| | | | | | | | | | | Strings are unpickled by calling eval on the string's repr. This change makes pickle work like cPickle; it checks if the pickled string is safe to eval and raises ValueError if it is not. test suite modifications: Verify that pickle catches a variety of insecure string pickles Make test_pickle and test_cpickle use exactly the same test suite Add test for pickling recursive object
* Basic regr tests for pickle/cPickleGuido van Rossum1999-03-251-0/+75