summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_userdict.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename class attribute containing the class to be tested, so the name is theWalter Dörwald2004-06-021-2/+2
| | | | same as for the string and sequence tests.
* Port the dictionary tests from test_types.py to unittest. Collect as muchWalter Dörwald2004-05-311-125/+23
| | | | | | mapping tests as possible in mapping_test.py and reuse the tests in test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py. From SF patch #736962.
* SF #904720: dict.update should take a 2-tuple sequence like dict.__init_Raymond Hettinger2004-03-041-1/+5
| | | | | | | | (Championed by Bob Ippolito.) The update() method for mappings now accepts all the same argument forms as the dict() constructor. This includes item lists and/or keyword arguments.
* * Migrate set() and frozenset() from the sandbox.Raymond Hettinger2003-11-161-4/+2
| | | | | | | | * Install the unittests, docs, newsitem, include file, and makefile update. * Exercise the new functions whereever sets.py was being used. Includes the docs for libfuncs.tex. Separate docs for the types are forthcoming.
* Used sets.Set() to compare unordered sequences.Raymond Hettinger2003-05-021-7/+3
| | | | Improves clarity and brevity.
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-5/+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.
* SF patch #667730: More DictMixinRaymond Hettinger2003-03-091-2/+124
| | | | | | | | * Adds missing pop() methods to weakref.py * Expands test suite to broaden coverage of objects with a mapping interface. Contributed by Sebastien Keim.
* SF patch #693753: fix for bug 639806: default for dict.popRaymond Hettinger2003-03-061-0/+6
| | | | (contributed by Michael Stone.)
* Port test_userdict.py to PyUnit. From SF patch #662807,Walter Dörwald2003-01-191-193/+233
| | | | with additional tests for setdefault(), pop() and popitem().
* Clean-up test class for DictMixin.Raymond Hettinger2002-12-111-2/+6
|
* Bring UserDict in-sync with changes to dict.Raymond Hettinger2002-11-271-0/+13
| | | | | | Constructor accepts optional keyword arguments after a optional items list. Add fromkeys() as an alternate constructor from an iterable over keys. Expand related unittests.
* Implement dict() style constructor.Raymond Hettinger2002-11-221-0/+3
| | | | | | | | | | | Already supported dict() and dict(mapping). Now supports dict(itemsequence) and Just van Rossum's new syntax for dict(keywordargs). Also, added related unittests. The docs already promise dict-like behavior so no update is needed there.
* Improve DictMixin.Raymond Hettinger2002-11-181-6/+5
| | | | | | | | | | | Replaced docstring with comments. Prevents subclass contamination. Added the missing __cmp__() method and a test for __cmp__(). Used try/except style in preference to has_key() followed by a look-up. Used iteritem() where possible to save creating a long key list and to save redundant lookups. Expanded .update() to look for the most helpful methods first and gradually work down to a mininum expected interface. Expanded documentation to be more clear on how to use the class.
* SF patch #520382: Expand shelve.py to have a full dictionary interfaceRaymond Hettinger2002-11-151-0/+98
| | | | | and add a mixin to UserDict.py to make it easier to implement a full dictionary interface.
* 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. :)
* Add regression test for SF bug #476616 -- make sure copy of a derived classFred Drake2001-11-051-0/+4
| | | | does not share data with the original.
* Fix the test so it uses IterableUserDict for the "for x in dict" test.Guido van Rossum2001-08-071-2/+2
|
* Give UserDict new __contains__ and __iter__ methods.Tim Peters2001-04-211-1/+15
|
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-20/+21
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Test suite for UserDictGuido van Rossum1999-03-261-0/+101