summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_heapq.py
Commit message (Collapse)AuthorAgeFilesLines
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-2/+1
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-1/+2
| | | | Patch by flox
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-1/+1
|
* Issue 5354: Change API for import_fresh_module() to better support ↵Nick Coghlan2009-04-221-1/+1
| | | | test_warnings use case (also fixes some bugs in the original implementation)
* Issue 5354: Provide a standardised testing mechanism for doing fresh imports ↵Nick Coghlan2009-04-111-16/+14
| | | | of modules, including the ability to block extension modules in order to test the pure Python fallbacks
* Fix typo in method name. The LT class implemented less than. The LE classNeal Norwitz2008-06-131-1/+1
| | | | should implement less than or equal to (as the code does).
* Add test for heapq using both __lt__ and __le__.Raymond Hettinger2008-06-111-0/+21
|
* Issue 2274: Add heapq.heappushpop().Raymond Hettinger2008-03-131-0/+28
|
* In test_heapq and test_bisect, test both the Python and the C implementation.Georg Brandl2008-02-231-49/+79
| | | | Originally written for GHOP by Josip Dzolonga, heavily patched by me.
* Add test for merge stabilityRaymond Hettinger2007-02-191-0/+15
|
* Add merge() function to heapq.Raymond Hettinger2007-02-191-1/+9
|
* Fix stability of heapq's nlargest() and nsmallest().Raymond Hettinger2007-01-041-12/+12
|
* Add key= argument to heapq.nsmallest() and heapq.nlargest().Raymond Hettinger2004-12-021-1/+7
|
* Fix argument order in pure python version of nsmallest() and nlargest().Raymond Hettinger2004-11-291-2/+5
|
* Plug a leak and beef-up test coverage.Raymond Hettinger2004-09-281-0/+149
|
* Whitespace normalization.Tim Peters2004-07-081-1/+0
|
* Exercise some error conditionsNeal Norwitz2004-07-081-0/+10
|
* Reverse argument order for nsmallest() and nlargest().Raymond Hettinger2004-06-151-4/+4
| | | | Reads better when the iterable is a generator expression.
* Install C version of heapq.nsmallest().Raymond Hettinger2004-06-131-6/+19
|
* Improve the memory performance and speed of heapq.nsmallest() by usingRaymond Hettinger2004-06-121-0/+1
| | | | | an alternate algorithm when the number of selected items is small relative to the full iterable.
* Convert test_heapq.py to unittests.Raymond Hettinger2004-06-101-86/+90
|
* SF patch #969791: Add nlargest() and nsmallest() to heapq.Raymond Hettinger2004-06-101-1/+10
|
* Add another test which exercises the whole suite with aRaymond Hettinger2002-12-071-0/+14
| | | | heapsort and verifies the result against list.sort().
* Added new heapreplace(heap, item) function, to pop (and return) theTim Peters2002-08-031-3/+2
| | | | | currently-smallest value, and add item, in one gulp. See the second N-Best algorithm in the test suite for a natural use.
* Minor fiddling, including a simple class to implement a heap iteratorTim Peters2002-08-031-5/+18
| | | | | in the test file. I have docs for heapq.heapify ready to check in, but Jack appears to have left behind a stale lock in the Doc/lib directory.
* Hmm! I thought I checked this in before! Oh well.Tim Peters2002-08-021-1/+19
| | | | | | | | | | | | Added new heapify() function, which transforms an arbitrary list into a heap in linear time; that's a fundamental tool for using heaps in real life <wink>. Added heapyify() test. Added a "less naive" N-best algorithm to the test suite, and noted that this could actually go much faster (building on heapify()) if we had max-heaps instead of min-heaps (the iterative method is appropriate when all the data isn't known in advance, but when it is known in advance the tradeoffs get murkier).
* check_invariant(): Use the same child->parent "formula" used by heapq.py.Tim Peters2002-08-021-2/+2
|
* Don't use true division where int division was intended. For that matter,Tim Peters2002-08-021-1/+1
| | | | don't use division at all.
* Adding the heap queue algorithm, per discussion in python-dev lastGuido van Rossum2002-08-021-0/+48
week.