summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* **kwds arg was missing from __init__ for Dict{Reader,Writer} classes.Skip Montanaro2003-09-061-0/+7
| | | | will backport.
* SF bug #801342: Bug (documentation or real, your choice) in random.sample.Raymond Hettinger2003-09-061-0/+10
| | | | | | | | | | | | random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding.
* SF bug #800796: Difference between hash() and __hash__()Raymond Hettinger2003-09-051-0/+5
| | | | slice(5).__hash__() now raises a TypeError.
* Patch #798145: Return correct information from nl_langinfo(RADIXCHAR).Martin v. Löwis2003-09-041-0/+34
| | | | Will backport to 2.3.
* Only apply case-insensitivity test on appropriate platforms.' test_filecmp.pyRaymond Hettinger2003-09-021-2/+6
|
* SF bug #453515: filecmp.dircmp case sensitivity bugRaymond Hettinger2003-09-021-2/+6
|
* SF patch #736962: Port tests to unittest (Part 2)Raymond Hettinger2003-09-021-12/+90
| | | | | | | (Contributed by Walter Dörwald.) * Convert test_slice.py to unittest format * Expand the test coverage.
* SF bug #785222: zlib monotonic testRaymond Hettinger2003-08-311-11/+0
| | | | | | For smaller datasets, it is not always true the increasing the compression level always results in better compression. Removed the test which made this invalid assumption.
* SF patch #736962: Port tests to unittestRaymond Hettinger2003-08-305-33/+145
| | | | | | | | (Contributed by Walter Dörwald). * Convert three test modules to unittest format. * Expanded coverage in test_structseq.py. * Raymond added a new test in test_sets.py
* SF bug 797650: Infinite loop in textwrap.pyRaymond Hettinger2003-08-301-0/+10
| | | | | | When the indents were set to longer than the width and long word breaking was enabled, an infinite loop would result because the inner loop did not assure that at least one character was stripped off on every pass.
* SF bug #793826: using itertools.izip to mutate tuplesRaymond Hettinger2003-08-291-1/+32
| | | | Avoid Armin Rigo's dastardly exercise in re-entrancy.
* Add tests for meta- bit setAndrew M. Kuchling2003-08-291-1/+4
|
* Add simple unit test for ascii.unctrl() functionAndrew M. Kuchling2003-08-291-0/+13
|
* Make sure parentheses are escaped when used in the format string.Brett Cannon2003-08-291-0/+9
| | | | Closes bug #796149 . Will be backported.
* SF bug #795506: Wrong handling of string format code for float values.Raymond Hettinger2003-08-271-0/+1
| | | | | | Adding missing support for '%F'. Will backport to 2.3.1.
* test_largefile can leave its temp file open if one of many tests fail. OnJason Tishler2003-08-261-73/+81
| | | | | | | | | | | | | | | | | | | | platforms (e.g., Cygwin) that are "particular" about open files, this will cause other regression tests that use the same temp file to fail: $ ./python.exe -E -tt Lib/test/regrtest.py -l test_largefile test_mmap test_mutants test_largefile test test_largefile failed -- got -1794967295L, but expected 2500000001L test_mmap test test_mmap crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test' test_mutants test test_mutants crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test' This patch solves the problem by adding missing "try/finally" blocks. Note that the "large" size of this patch is due to many white space changes -- otherwise, the patch is small. I tested this patch under Red Hat Linux 8.0 too.
* Improvements to set.py:Raymond Hettinger2003-08-171-11/+133
| | | | | | | | | | | | | | | | | | | * Relaxed the argument restrictions for non-operator methods. They now allow any iterable instead of requiring a set. This makes the module a little easier to use and paves the way for an efficient C implementation which can take better advantage of iterable arguments while screening out immutables. * Deprecated Set.update() because it now duplicates Set.union_update() * Adapted the tests and docs to include the above changes. * Added more test coverage including testing identities and checking to make sure non-restartable generators work as arguments. Will backport to Py2.3.1 so that the interface remains consistent across versions. The deprecation of update() will be changed to a FutureWarning.
* Keep doctests in sync with the docs.Raymond Hettinger2003-08-161-5/+5
|
* Make a copy of L before appending, so the global L remainsWalter Dörwald2003-08-151-4/+4
| | | | | | unchanged (and sys.gettotalrefcount() remains constant). Fix a few typos.
* Fix forMichael W. Hudson2003-08-151-0/+31
| | | | | | | | | [ 784825 ] fix obscure crash in descriptor handling Should be applied to release23-maint and in all likelyhood release22-maint, too. Certainly doesn't apply to release21-maint.
* [Patch #739124] Add use_default_colors() to curses moduleAndrew M. Kuchling2003-08-131-0/+3
|
* Add a unicode prefix to the characters in the UnicodeEncodeError andWalter Dörwald2003-08-121-9/+9
| | | | UnicodeTranslateError message.
* Enhance message for UnicodeEncodeError and UnicodeTranslateError.Walter Dörwald2003-08-121-3/+35
| | | | | If there is only one bad character it will now be printed in a form that is a valid Python string.