Commit Graph

70 Commits

Author SHA1 Message Date
Martin v. Löwis 5b1e003da8 Try a number of ports, in case 9020 is already in use. 2006-01-29 20:10:38 +00:00
Martin v. Löwis f684888b1e Explicitly close the server socket. 2006-01-29 19:55:18 +00:00
Vinay Sajip 568482a266 Added a test for the ability to specify a class attribute in Formatter configuration. Contributed by Shane Hathaway. 2006-01-20 18:29:36 +00:00
Vinay Sajip 22b25aa9e2 Added test for fileConfig. Contributed by Shane Hathaway. 2006-01-16 21:24:38 +00:00
Tim Peters 0cdc3d884e test_main(): Restore the original root logger level after running
the tests.  This stops the confusing/annoying:

    No handlers could be found for logger "cookielib"

message we got whenever some test running after test_logging
happened to use cookielib.py (when not using regrtest's -r,
this happened during test_urllib2; when using -r, it varied).
2005-12-30 20:46:23 +00:00
Vinay Sajip 6887c92b1e Close handlers and tidy up loggers by removing closed handlers - to avoid problems when run twice (SF #1002537) 2004-08-04 08:29:14 +00:00
Vinay Sajip 7dc8ec9091 Copyright year changed 2004-06-02 10:51:05 +00:00
Vinay Sajip bb99058898 Socket handler closed prior to end of test. 2004-02-20 13:19:16 +00:00
Tim Peters 9390dd5b4a locale-restoration code: Don't leave comparison to None implicit. For
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.
2003-07-23 00:30:11 +00:00
Tim Peters 36f7e938f2 Fred wasn't kidding -- there really are docs for the locale module <wink>.
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.
2003-07-23 00:05:07 +00:00
Jeremy Hylton 096d986f3b Restore the locale to "C" on exit.
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.
2003-07-18 03:19:20 +00:00
Raymond Hettinger 6f3eaa67e5 SF patch #761519: Fixes for bugs 760703 and 757821
SF bug #760703: SocketHandler and LogRecord don't work well together
SF bug #757821: logging module docs

Applied Vinay Sajip's patch with a few minor fixups and a NEWS item.

Patched __init__.py - added new function
makeLogRecord (for bug report 760703).

Patched handlers.py - updated some docstrings and
deleted some old commented-out code.

Patched test_logging.py to make use of makeLogRecord.

Patched liblogging.tex to fill documentation gaps (both
760703 and bug 757821).
2003-06-27 21:43:39 +00:00
Brett Cannon f9addb676d Change from a threading.Condition object to a threading.Event object for
signalling when the TCP server is done.  Should hopefully solve hanging
issues for Solaris 8 & 9.  Solves the apparent hanging issue with OS X.

Closes patch #729988 .
2003-04-30 05:32:32 +00:00
Guido van Rossum ecf0f02518 Merge back from r23b1-branch 2003-04-26 00:21:31 +00:00
Guido van Rossum 376e636f18 New version from Vinaj, should solve the threading problems (hopefully). 2003-04-25 14:22:00 +00:00
Neal Norwitz 6fa635df7a SF patch #687683, Patches to logging (updates from Vinay)
Mostly rename WARN -> WARNING
Other misc tweaks
Update tests (not in original patch)
2003-02-18 14:20:07 +00:00
Guido van Rossum 2a1d51602b Fix from Vinaj for the "writing to closed file" errors. SF 670390. 2003-01-21 21:05:22 +00:00
Jack Jansen 8834009338 On Mac OS X calling setlocale will raise locale.Error. This isn't fatal,
so just continue testing. Fixes #668787.
2003-01-15 23:43:02 +00:00
Neal Norwitz 502b9e1fbb At least one Solaris box in the snake farm only supports "C" locale.
Adding try/except allows the test to pass
2003-01-05 18:15:23 +00:00
Neal Norwitz b4a2df0c8d SF #660795
Add a test for logging from Vinay Sajip (module author)
2003-01-02 14:56:39 +00:00