summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_userdict.py
Commit message (Collapse)AuthorAgeFilesLines
* #7092 - Silence more py3k deprecation warnings, using ↵Florent Xicluna2010-03-211-4/+5
| | | | test_support.check_py3k_warnings() helper.
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-2/+2
|
* use assert[Not]In where appropriateEzio Melotti2010-01-231-7/+7
|
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-8/+4
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-4/+8
| | | | Patch by flox
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-14/+14
|
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Fix a bug in test_dict and test_userdict, found at the PyPy sprint.Georg Brandl2007-03-041-3/+3
|
* - Patch 1433928:Guido van Rossum2006-02-251-0/+49
| | | | | | | | - The copy module now "copies" function objects (as atomic objects). - dict.__getitem__ now looks for a __missing__ hook before raising KeyError. - Added a new type, defaultdict, to the collections module. This uses the new __missing__ hook behavior added to dict (see above).
* Use descriptors.Guido van Rossum2005-01-161-1/+1
|
* 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