summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Fix bug in test_bad_timezone where test was assuming locale knew of PDT.Brett Cannon2003-08-111-2/+3
|
* 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 handling of bad locale setup where time.tzname[0] == time.tzname[1] andBrett Cannon2003-08-111-0/+20
| | | | | | time.daylight is true. Add an explicit test for this situation. Fixed some wording in docstrings.
* 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 successive 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
|
* Modified itertools.izip() to match the behavior of __builtin__.zip()Raymond Hettinger2003-08-081-1/+6
| | | | which can now take zero arguments.
* Re-sync doc tests with the doc updates.Raymond Hettinger2003-08-081-3/+7
|
* Repair refcounting on error return from type_set_bases.Michael W. Hudson2003-08-071-0/+7
| | | | Include a test case that failed for one of my efforts to repair this.
* Demonstrate and fix [ 783882 ] os.lstat crashes with Unicode filename.Mark Hammond2003-08-061-0/+2
| | | | Will also check in on the 2.3 branch.
* Remove useless import.Walter Dörwald2003-08-051-1/+1
|
* Check both __div__ and __truediv__ in division tests.Walter Dörwald2003-08-051-1/+9
| | | | (From SF patch #543867)
* Support trailing dots in DNS names. Fixes #782510. Will backport to 2.3.Martin v. Löwis2003-08-051-0/+4
|
* Correct URL of normalization file. Fixes #781065. Will backport to 2.3.Martin v. Löwis2003-08-051-2/+2
|
* Re-introduce caching of TimeRE and compiled regexes with added thread-safety.Brett Cannon2003-08-051-60/+54
| | | | | | | | | | | | Also remove now unnecessary property attributes for thread safety (no longer have lazy attributes) and code simplicity reasons. Timezone storage has been reworked to be simpler and more flexible. All values in LocaleTime instances are lower-cased. This is all done to simplify the module. The module now assumes nothing beyond the strptime function will be exposed for general use beyond providing functionality for strptime.
* protect against test problems with JythonSkip Montanaro2003-08-031-6/+7
|
* added test for bug 782369Skip Montanaro2003-08-031-0/+9
|
* more extension marshal tests and conversion to unittest - was surprised toSkip Montanaro2003-08-021-39/+183
| | | | see how much of the file was not covered by the build process
* As discussed on python-dev, changed builtin.zip() to handle zero argumentsRaymond Hettinger2003-08-022-2/+6
| | | | by returning an empty list instead of raising a TypeError.
* 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
* Make close() identical to __del__() for a dumbdbm database. MakeTim Peters2003-07-131-0/+7
| | | | | | | closing idempotent (it used to raise a nuisance exception on the 2nd close attempt). Bugfix candidate? Probably, but arguable.
* Reworked test_warnings.py:Raymond Hettinger2003-07-132-56/+81
| | | | | | | | | | | | | * It ran fine under "python regrtest.py test_warnings" but failed under "python regrtest.py" presumably because other tests would add to filtered warnings and not reset them at the end of the test. * Converted to a unittest format for better control. Renamed monkey() and unmonkey() to setUp() and tearDown(). * Increased coverage by testing all warnings in __builtin__. * Increased coverage by testing regex matching of specific messages.
* This test failed on WindowsME because the full file path did not getRaymond Hettinger2003-07-132-6/+6
| | | | | | reported consistently with the *nix world. 'Lib/test/test_warnings.py' came out as 'lib\test\test_warnings.py'. The basename is all we care about so I used that.
* Don't include slash in search string; it's OS-specific.Jeremy Hylton2003-07-111-1/+1
|
* Change warnings to avoid importing re module during startup.Jeremy Hylton2003-07-112-0/+63
| | | | | | | | | Add API function simplefilter() that does not create or install regular expressions to match message or module. Extend the filters data structure to store None as an alternative to re.compile(""). Move the _test() function to test_warnings and add some code to try and avoid disturbing the global state of the warnings module.
* Added a new randomized test.Tim Peters2003-07-111-0/+28
|
* Fix SF bug 764095: Don't use network in test_httplib.Jeremy Hylton2003-07-082-14/+35
|
* New function sys.getcheckinterval(), to complement setcheckinterval().Tim Peters2003-07-061-2/+4
|