summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix for [ 765456 ]: testAFakeZlib failed on platforms that use aJust van Rossum2003-11-181-0/+7
| | | | | statically linked zlib module, but since the problem it tests can't exist on these systems, simply skip it then. Will backport.
* Test the applesingle decoder.Jack Jansen2003-11-181-0/+72
|
* Various fixups (most suggested by Armin Rigo).Raymond Hettinger2003-11-171-0/+25
|
* * Migrate set() and frozenset() from the sandbox.Raymond Hettinger2003-11-1612-36/+1206
| | | | | | | | * 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.
* subtype_dealloc(): A more complete fix for critical bug 840829 +Tim Peters2003-11-131-0/+19
| | | | | | expanded the test case with a piece that needs the more-complete fix. I'll backport this to 2.3 maint.
* Patch #839877: Remove unused lambda expression.Martin v. Löwis2003-11-131-4/+0
|
* SF bug 840829: weakref callbacks and gc corrupt memory.Tim Peters2003-11-121-0/+20
| | | | | | | | | | | | | | | | | subtype_dealloc(): This left the dying object exposed to gc, so that if cyclic gc triggered during the weakref callback, gc tried to delete the dying object a second time. That's a disaster. subtype_dealloc() had a (I hope!) unique problem here, as every normal dealloc routine untracks the object (from gc) before fiddling with weakrefs etc. But subtype_dealloc has obscure technical reasons for re-registering the dying object with gc (already explained in a large comment block at the bottom of the function). The fix amounts to simply refraining from reregistering the dying object with gc until after the weakref callback (if any) has been called. This is a critical bug (hard to predict, and causes seemingly random memory corruption when it occurs). I'll backport it to 2.3 later.
* Improve the implementation of itertools.tee().Raymond Hettinger2003-11-121-24/+31
| | | | | | | | | | | Formerly, underlying queue was implemented in terms of two lists. The new queue is a series of singly-linked fixed length lists. The new implementation runs much faster, supports multi-way tees, and allows tees of tees without additional memory costs. The root ideas for this structure were contributed by Andrew Koenig and Guido van Rossum.
* Update test to handle list.__reversed__().Raymond Hettinger2003-11-081-0/+1
|
* Convert heapq.py to a C implementation.Raymond Hettinger2003-11-081-1/+0
|
* Overallocate target buffer for normalization more early. Fixes #834676.Martin v. Löwis2003-11-061-0/+3
| | | | Backported to 2.3.
* Implement and apply PEP 322, reverse iterationRaymond Hettinger2003-11-061-1/+19
|
* * Use weakref's of DBCursor objects for the iterator cursors to avoid aGregory P. Smith2003-11-031-3/+76
| | | | | | | | | | memory leak that would've occurred for all iterators that were destroyed before having iterated until they raised StopIteration. * Simplify some code. * Add new test cases to check for the memleak and ensure that mixing iteration with modification of the values for existing keys works.
* * Fix the singlethreaded deadlocks occurring in the simple bsddb interface.Gregory P. Smith2003-11-021-1/+52
| | | | | * Add support for multiple iterator/generator objects at once on the simple bsddb _DBWithCursor interface.
* Patch #830858: Correct the number of is-functions. Backported to 2.3 and 2.2.Martin v. Löwis2003-10-311-0/+4
|
* Update test to include "sorted" in dir(list).Raymond Hettinger2003-10-291-1/+2
|
* Add list.sorted() classmethod.Raymond Hettinger2003-10-291-0/+58
|
* Deleting cyclic object comparison.Armin Rigo2003-10-284-69/+43
| | | | | SF patch 825639 http://mail.python.org/pipermail/python-dev/2003-October/039445.html
* Replace the window() example with pairwise() which demonstrates tee().Raymond Hettinger2003-10-261-13/+10
|
* Minor improvements to itertools.tee():Raymond Hettinger2003-10-261-0/+12
| | | | | | * tee object is no longer subclassable * independent iterators renamed to "itertools.tee_iterator" * fixed doc string typo and added entry in the module doc string
* Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().Walter Dörwald2003-10-241-0/+12
| | | | | | | charmaptranslate_makespace() allocated more memory than required for the next replacement but didn't remember that fact, so memory size was growing exponentially every time a replacement string is longer that one character. This fixes SF bug #828737.
* Added itertools.tee()Raymond Hettinger2003-10-241-61/+130
| | | | | | It works like the pure python verion except: * it stops storing data after of the iterators gets deallocated * the data queue is implemented with two stacks instead of one dictionary.
* Patch #813200: Quote executable path on Windows. Fixes #811082.Martin v. Löwis2003-10-231-2/+10
| | | | Backported to 2.3.
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-204-4/+4
| | | | (From SF patch #810751)
* Implemented non-recursive SRE matching.Gustavo Niemeyer2003-10-171-7/+7
|
* * list.sort() now supports three keyword arguments: cmp, key, and reverse.Raymond Hettinger2003-10-161-45/+101
| | | | | | | key provides C support for the decorate-sort-undecorate pattern. reverse provide a stable sort of the list with the comparisions reversed. * Amended the docs to guarantee sort stability.
* Add test__locale to expected skip list for Darwin.Brett Cannon2003-10-131-0/+1
|
* Patch #810914: Return absolute path for mkstemp. Fixes #810408.Martin v. Löwis2003-10-121-1/+7
| | | | | This should not be backported to 2.3, as it might break backwards compatibility.
* see rev. 1.13 for log messageBrett Cannon2003-10-121-5/+2
|
* Fix for SF bug [ 817156 ] invalid \U escape gives 0=length unistr.Jeremy Hylton2003-10-061-0/+7
|
* Adopt Christian Stork's suggested argument order for the logic quantifiers.Raymond Hettinger2003-10-051-11/+11
| | | | Adopt Jeremy Fincher's suggested function name, "any", instead of "some".
* SF bug #812202: randint is always evenRaymond Hettinger2003-10-051-0/+78
| | | | | | | * Added C coded getrandbits(k) method that runs in linear time. * Call the new method from randrange() for ranges >= 2**53. * Adds a warning for generators not defining getrandbits() whenever they have a call to randrange() with too large of a population.
* Make the fieldnames argument optional in the DictReader. If self.fieldnamesSkip Montanaro2003-10-031-1/+10
| | | | | | | | | is None, the next row read is used as the fieldnames. In the common case, this means the programmer doesn't need to know the fieldnames ahead of time. The first row of the file will be used. In the uncommon case, this means the programmer can set the reader's fieldnames attribute to None at any time and have the next row read as the next set of fieldnames, so a csv file can contain several "sections", each with different fieldnames.
* Add more identity tests.Raymond Hettinger2003-09-241-0/+11
|
* PlaySoundTest.test_alias_nofallback(): Simplified the coding by usingTim Peters2003-09-221-7/+2
| | | | | | assertRaises. NOT a bugfix candidate.
* PlaySoundTest.test_alias_fallback(): Disabled this test, and explainedTim Peters2003-09-221-1/+12
| | | | | | | | | | why in a new comment. My home Win98SE box is one of the "real systems" alluded to (my system "default sound" appears to have vanished sometime in the last month, that's certainly not a Python bug, and the MS PlaySound docs are correct in their explanation of what happens then). Bugfix candidate. If someone can still sneak it into 2.3.1, that would be good.
* Improve and expand identity tests.Raymond Hettinger2003-09-211-11/+18
|
* SF patch 809915: Fix bogus address to hopefully always break.Tim Peters2003-09-201-1/+8
| | | | | | | test_bad_address(): Recover from that VeriSign thought it would boost its corporate coffers to start resolving http://www.sadflkjsasadf.com/. Bugfix candidate -- although the bug is more VeriSign's than Python's!
* test__locale (two underscores) can't pass on Windows: RADIXCHAR doesn'tTim Peters2003-09-201-0/+1
| | | | | exist, and neither do any of the specific 5-letter locale names the test is looking for.
* Patch #707167: Pass dircache exceptions to the caller. Fixes #682813.Martin v. Löwis2003-09-201-1/+1
| | | | Not backported because of behaviour change.
* SF patch #806246: use basestring where possibleRaymond Hettinger2003-09-171-1/+1
| | | | (Contributed by George Yoshida.)
* Test __all__ for unittest.pyRaymond Hettinger2003-09-161-1/+2
|
* * Converted test to unittest format.Raymond Hettinger2003-09-131-85/+158
| | | | * Expanded coverage.
* Simplify doctest of tee().Raymond Hettinger2003-09-131-6/+2
|
* Patch #790000: Allow os.access to handle Unicode file name.Martin v. Löwis2003-09-121-0/+1
|
* SF #662923Raymond Hettinger2003-09-121-6/+18
| | | | | | Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed.
* Oops. Really fix the indentation problem this time.Jeremy Hylton2003-09-101-13/+13
|
* Fix inconsistent mix of tabs and spaces that caused test to fail.Jeremy Hylton2003-09-101-5/+4
|
* Add an example to address a common question of how to split iterators.Raymond Hettinger2003-09-081-4/+30
|
* SF bug 801631: file.truncate fault on windows.Tim Peters2003-09-071-0/+28
| | | | | | | | | | | | | | | | | file_truncate(): C doesn't define what fflush(fp) does if fp is open for update, and the preceding I/O operation on fp was input. On Windows, fflush() actually changes the current file position then. Because Windows doesn't support ftruncate() directly, this not only caused Python's file.truncate() to change the file position (contra our docs), it also caused the file not to change size. Repaired by getting the initial file position at the start, restoring it at the end, and tossing all the complicated micro-efficiency checks trying to avoid "provably unnecessary" seeks. file.truncate() can't be a frequent operation, and seeking to the current file position has got to be cheap anyway. Bugfix candidate.