summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
Commit message (Collapse)AuthorAgeFilesLines
* return NotImplemented from Mapping when comparing to a non-mapping #8729Benjamin Peterson2010-05-211-1/+48
|
* Add subtract() method to collections.Counter() objects.Raymond Hettinger2010-04-031-0/+11
|
* #7624: Fix isinstance(foo(), collections.Callable) for old-style classes.Florent Xicluna2010-03-081-2/+30
|
* Issue 6292: for the moment at least, the test suite passes if runR. David Murray2010-02-231-1/+7
| | | | | | with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch.
* Remove unused imports in test modules.Georg Brandl2010-02-071-2/+1
|
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-24/+24
|
* use assert[Not]In where appropriateEzio Melotti2010-01-231-7/+8
|
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-4/+2
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-2/+4
| | | | Patch by flox
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-67/+67
|
* Revert r73401 per Raymond Hettinger's request.Alexandre Vassalotti2009-06-121-2/+2
| | | | | | The rational is the change might cause imcompatiblity problems with PyYAML. In addition, Raymond wants to kept the different versions of collections synchronized across Python versions.
* Make pickling of OrderedDict instances more efficient.Alexandre Vassalotti2009-06-121-2/+2
|
* Fix field name conflicts for named tuples.Raymond Hettinger2009-05-271-0/+40
|
* Have namedtuple's field renamer assign names thatRaymond Hettinger2009-04-021-6/+6
| | | | are consistent with the corresponding tuple index.
* Issue #5647: MutableSet.__iand__() no longer mutates self during iteration.Raymond Hettinger2009-04-011-0/+25
|
* * Add clearer comment to initialization code.Raymond Hettinger2009-03-191-0/+7
| | | | | | * Add optional argument to popitem() -- modeled after Anthon van der Neut's C version. * Fix method markup in docs.
* Backport 70140, 70141, 70143, and 70144.Raymond Hettinger2009-03-031-0/+17
| | | | | Adds tests, switches from list to deque, fixes __reduce__ which was unnecessarily copying __keys.
* Beef-up tests.Raymond Hettinger2009-03-031-3/+6
|
* Backport PEP 372: OrderedDict()Raymond Hettinger2009-03-031-3/+192
|
* Backport 69934: Register xrange() as a Sequence.Raymond Hettinger2009-02-241-0/+3
|
* Issue 1818: collections.namedtuple() to support automatic renaming of ↵Raymond Hettinger2009-02-101-0/+11
| | | | invalid fieldnames.
* Issue 4920: Fixed next() vs __next__() issues in the ABCsRaymond Hettinger2009-01-281-2/+63
| | | | | for Iterator and MutableSet. Also added thorough test for required abstractmethods.
* Tighten-up the docs for Counter().Raymond Hettinger2009-01-211-0/+5
|
* Simplify explanation of multiset operations by removing restrictions on ↵Raymond Hettinger2009-01-211-8/+9
| | | | negative inputs.
* Build-outs for Counter() class:Raymond Hettinger2009-01-201-1/+44
| | | | | | * Constructor and update() support keyword args (like their dict counterparts). * The 'del' statement no longer raises KeyError for missing values. * Add multiset operations: __add__, __sub__, __and__, __or__.
* Add tests for __init__() and update() with no args.Raymond Hettinger2009-01-141-0/+2
|
* Simplify Counter() API. Replace items keyword argumentRaymond Hettinger2009-01-131-4/+4
| | | | | | | with a mapping. Makes Counter() idempotent, makes update() API the same as Counter.__init__(), makes a more readable repr, makes the API more dict-like, and allows Steven Bethard's update() example to work.
* Issue 1696199: Add collections.Counter().Raymond Hettinger2009-01-121-2/+98
|
* Fix namedtuple bug reported by Glenn Linderman. Template did not form ↵Raymond Hettinger2008-09-251-0/+5
| | | | correctly if the field names were input in Unicode.
* Issue 2235: Py3k warnings are now emitted for classes that will no longer ↵Nick Coghlan2008-08-111-0/+1
| | | | inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
* Issue 3161: Missing import and test.Raymond Hettinger2008-06-231-0/+15
|
* Issue3065: Fixed pickling of named tuples. Added tests.Raymond Hettinger2008-06-091-1/+20
|
* Take namedtuple item names only from ascii_letters (this blew up on OSX),Georg Brandl2008-05-181-1/+3
| | | | and make sure there are no duplicate names.
* A DocTestSuite cannot run multiple times: it clears its globals dictionary ↵Amaury Forgeot d'Arc2008-04-021-3/+2
| | | | | | after the first run. Rebuild the DocTestSuite on each iteration.
* Run doctests on the collections moduleRaymond Hettinger2008-01-111-2/+4
|
* Add error-checking to namedtuple's _replace() method.Raymond Hettinger2008-01-051-0/+7
|
* Improve namedtuple's _cast() method with a docstring, new name, and ↵Raymond Hettinger2008-01-051-4/+7
| | | | error-checking.
* Minor fix-ups to named tuples:Raymond Hettinger2008-01-041-8/+1
| | | | | | | | | * Make the _replace() method respect subclassing. * Using property() to make _fields read-only wasn't a good idea. It caused len(Point._fields) to fail. * Add note to _cast() about length checking and alternative with the star-operator.
* Users demand iterable input for named tuples. The author capitulates.Raymond Hettinger2007-12-181-0/+4
|
* Add more namedtuple() test cases. Neaten the code and comments.Raymond Hettinger2007-12-181-1/+28
|
* Cleaner method naming conventionRaymond Hettinger2007-12-141-8/+8
|
* Error checking was too aggressive (reported by Chris Tismer)Raymond Hettinger2007-12-051-0/+1
|
* Backport of _abccoll.py by Benjamin Arangueren, issue 1383.Guido van Rossum2007-11-221-1/+185
| | | | With some changes of my own thrown in (e.g. backport of r58107).
* Accept Issac Morland's suggestion for __replace__ to allow multiple replacementsRaymond Hettinger2007-11-151-1/+1
| | | | | | (suprisingly, this simplifies the signature, improves clarity, and is comparably fast). Update the docs to reflect a previous change to the function name. Add an example to the docs showing how to override the default __repr__ method.
* Add test for __fields__ being read-onlyRaymond Hettinger2007-11-141-0/+8
|
* Shorter name for namedtuple()Raymond Hettinger2007-10-231-17/+17
|
* More docs, error messages, and testsRaymond Hettinger2007-10-161-6/+11
|
* Eliminate camelcase function nameRaymond Hettinger2007-10-081-12/+14
|
* Add comments to NamedTuple code.Raymond Hettinger2007-10-081-0/+5
| | | | | Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases). Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
* Add __asdict__() to NamedTuple and refine the docs.Raymond Hettinger2007-10-051-0/+2
| | | | | | Add maxlen support to deque() and fixup docs. Partially fix __reduce__(). The None as a third arg was no longer supported. Still needs work on __reduce__() to handle recursive inputs.