summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* Backport Tim's fix to test_winsound.pyRaymond Hettinger2003-09-221-1/+12
| | | | | | | | PlaySoundTest.test_alias_fallback(): Disabled this test, and explained 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).
* Backport Tim's fix to SF #809915.Raymond Hettinger2003-09-211-1/+8
| | | | Creates a url that should always be invalid.
* Fix documentation bugs.Raymond Hettinger2003-09-161-73/+158
| | | | | Add support for iterators and other mapping methods. Convert tests to unittest format and expand their coverage.
* Backport addition of the __all__ attribute for unittest.pyRaymond Hettinger2003-09-161-1/+2
|
* **kwds arg was missing from __init__ for Dict{Reader,Writer} classes.Skip Montanaro2003-09-061-0/+7
|
* SF bug #801342: Bug (documentation or real, your choice) in random.sample.Raymond Hettinger2003-09-051-0/+11
| | | | | | | | | | | | 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.
* 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
|
* Fix failing testRaymond Hettinger2003-09-021-1/+1
|
* 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.
* * Add news item for the previous bugfixRaymond Hettinger2003-08-301-4/+13
| | | | * Backport itertoolsmodule.c 1.19 to re-sync Py2.3.1 with Py2.4.
* 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.
* _strptime.srptime() escaped parentheses in the format string properly.Brett Cannon2003-08-291-0/+9
| | | | Closes bug #796149 .
* SF bug #795506: Wrong handling of string format code for float values.Raymond Hettinger2003-08-271-0/+1
| | | | Added missing support for '%F' as had been documented.
* 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.
* Backport improvements to set.py so that the interface will remainRaymond Hettinger2003-08-171-16/+138
| | | | | | | | | | | | | | | | | | consistent across versions. * 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. * Added a PendingDeprecationWarning for 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.
* Backport checkin:Walter Dörwald2003-08-151-4/+4
| | | | | | | Make a copy of L before appending, so the global L remains unchanged (and sys.gettotalrefcount() remains constant). Fix a few typos.
* Backport checkins:Walter Dörwald2003-08-121-3/+35
| | | | | | | | * Enhance message for UnicodeEncodeError and UnicodeTranslateError. If there is only one bad character it will now be printed in a form that is a valid Python string. * Add a unicode prefix to the characters in the UnicodeEncodeError and UnicodeTranslateError message.
* Unconditionally opening the temp file in text mode causes this test to failJason Tishler2003-08-111-2/+5
| | | | | | under Cygwin. The attached patch corrects this problem. I tested this patch under Red Hat Linux 8.0 too.
* Fix bug where handling issue of time.tzname[0] == time.tzname[1] andBrett Cannon2003-08-111-0/+23
| | | | | | time.daylight were all true. Add an explicit test for this issue. Closes bug #783952 .
* SF bug #778964: bad seed in python 2.3 randomRaymond Hettinger2003-08-091-1/+1
| | | | | | | The default seed is time.time(). Multiplied by 256 before truncating so that fractional seconds are used. This way, two consequetive calls to random.seed() are much more likely to produce different sequences.
* SF bug #770485: cStringIO does not set closed attrRaymond Hettinger2003-08-081-0/+10
|
* As penance for forgetting to flag my last checkins as bugfix candidates,Michael W. Hudson2003-08-071-0/+7
| | | | | | just do the backport. These changes do not apply to release22-maint.
* Re-introduction of caching. Not thread-safe against the changing of localeBrett Cannon2003-08-061-0/+41
| | | | | in the middle of executing time.strptime . Added new tests for caching mechanism; taken from 2.4 branch and tweaked appropriately.
* Demonstrate and fix [ 783882 ] os.lstat crashes with Unicode filename.Mark Hammond2003-08-061-0/+2
| | | | Also checked in on trunk.
* Remove __floordiv__ test, as it's deprecated.Walter Dörwald2003-08-051-4/+0
|
* Backport:Walter Dörwald2003-08-051-0/+12
| | | | | | * Check both __div__ and __truediv__ in division tests. (From SF patch #543867) * Remove useless import.
* Support trailing dots in DNS names. Fixes #782510.Martin v. Löwis2003-08-051-0/+4
|
* Correct URL for normalization file. Fixes #781065.Martin v. Löwis2003-08-051-2/+2
|
* Merging release23-branch into the long-term Python 2.3 maintenance branchBarry Warsaw2003-08-045-4/+11
|
* Remove caching of TimeRE (and thus LocaleTime) instance. Error was beingBrett Cannon2003-07-241-7/+10
| | | | | | caught when executing test_strptime, test_logging, and test_time in that order when the testing of "%c" occured. Suspect the cache was not being recreated (the test passed when test_logging was forced to re-establish the locale).
* Restored commented-out line checked in by mistake.Tim Peters2003-07-231-1/+1
|
* locale-restoration code: Don't leave comparison to None implicit. ForTim Peters2003-07-232-2/+2
| | | | | all I know, the original locale may be '' (I don't think that's possible, but ...), and if so we would certainly want to restore it.
* Fred wasn't kidding -- there really are docs for the locale module <wink>.Tim Peters2003-07-231-11/+20
| | | | | | | | | | | | | | Obtain the original locale in the documented way. This way actually works for me. Restore the original locale at the end, instead of forcing to "C". Move the locale fiddling into the test driver instead of doing it as a side effect of merely importing the module. I don't know why the test is mucking with locale (and also added a comment saying so), but it surely has no justification for doing that as an import side-effect. Now whenever the locale-changing code executes, the locale-restoring code will also get run.
* Fix error in test of not comparing against 0 item of a listBrett Cannon2003-07-221-1/+1
|
* Patch #775784: YA Cygwin expected regression test skip patchJason Tishler2003-07-221-0/+1
| | | | This patch just adds test_ioctl to the list of expected skips for Cygwin.
* Change the zipimport implementation to accept files containingThomas Heller2003-07-221-1/+20
| | | | | | | | | arbitrary bytes before the actual zip compatible archive. Zipfiles containing comments at the end of the file are still not supported. Add a testcase to test_zipimport, and update NEWS. This closes sf #775637 and sf #669036.
* Make sure mimetypes is reinitialized before running the tests.Jeremy Hylton2003-07-181-0/+1
| | | | | If some other test comes along and uses mimetypes, it will be initialized from the system files.
* Restore the locale to "C" on exit.Jeremy Hylton2003-07-181-2/+5
| | | | | | If this doesn't happen, it leaves the locale in a state that can cause other tests to fail. For example, running test_strptime, test_logging, and test_time in that order.
* Reflow long line.Jeremy Hylton2003-07-171-2/+2
|
* Exercise Jim Fulton's new doctest extension for running doctests in aRaymond Hettinger2003-07-161-2/+5
| | | | | unittest environment. Since his extension finds docstrings in private functions, it exposed a bug in the difflib doctests.
* Extend last change to cover TestSuites as well as TestCases.Raymond Hettinger2003-07-161-1/+1
|
* Prevent failure on the mac, where "mbcs" is not the file systemMark Hammond2003-07-161-2/+3
| | | | encoding. Use sys.getfilesystemencoding().
* run_unittest() to support TestCase instances as well as classes. Helps with ↵Raymond Hettinger2003-07-161-1/+4
| | | | doctests.
* Fixed test and converted to unittest format.Raymond Hettinger2003-07-151-1/+0
| | | | | Checking // would call floor division but did not test that true division had become the default with 'from __future__ import division'.
* Fixed test and converted to unittest format.Raymond Hettinger2003-07-151-6/+25
| | | | | Checking // would call floor division but did not test that true division had become the default with 'from __future__ import division'.
* SF patch 763201: handling of SyntaxErrors in symbol table buildJeremy Hylton2003-07-152-3/+30
| | | | Bug fix candidate.
* Add various test cases from SF patch 543867.Walter Dörwald2003-07-151-1/+58
|
* stylistic nits:Fred Drake2003-07-141-6/+8
| | | | | | - wrap some long lines - shorten others - fix indentation