summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_logging.py
Commit message (Collapse)AuthorAgeFilesLines
* Added duplicate call to fileConfig() to ensure that it cleans up after ↵Vinay Sajip2006-07-011-0/+2
| | | | itself correctly.
* Bug #1473625: stop cPickle making float dumps locale dependent in protocol 0.Georg Brandl2006-04-301-14/+5
| | | | | On the way, add a decorator to test_support to facilitate running single test functions in different locales with automatic cleanup.
* Backout the last hack and add in this new one.Neal Norwitz2006-03-051-14/+8
| | | | | | | | | | | | | | | The failure definitely seems timing related. This change *seems* to work. Since the failure isn't doesn't occur consistently, it's hard to tell. Running these tests on Solaris in this order: test_urllibnet test_operator test_cgi \ test_isinstance test_future test_ast test_logging generally caused a failure (about 50% of the time) before the sleep. I couldn't provoke the failure with the sleep. This should really be cleaned up by using threading.Events or something so it is not timing dependent and doesn't hang forever on failure.
* I think the test_logging failure on Solaris is timing related. We don'tNeal Norwitz2006-03-031-5/+14
| | | | | | | want to wait forever if we don't receive the last message. But we also don't want the test to fail if we shutdown too quickly. I can't reliably reproduce this failure, so I'm kinda guessing this is the problem. We'll see if this band-aid helps.
* Added lock acquisition/release around shared data structure manipulationVinay Sajip2006-02-091-19/+34
|
* Saved and restored logging._handlerList at the same time as saving/restoring ↵Vinay Sajip2006-02-071-0/+4
| | | | logging._handlers.
* Get test_logging to not hang when running under regrtest.py -R ::Neal Norwitz2006-02-051-4/+4
| | | | | | | | | | | | | | Not sure why/how _handlers/_handlerList is out of sync. This could indicate a deeper problem. In test_logging, the only absolutely necessary change to get working was tcpserver.abort = 1. But we don't want to wait infinitely to join the threads, so give a 2.0 second timeout. There doesn't appear to be a need for a local abort variable in serve_until_stopped, so just use the instance member. Note the problem is only on HEAD, not in 2.4.
* Whitespace normalization.Tim Peters2006-01-291-1/+1
|
* Try a number of ports, in case 9020 is already in use.Martin v. Löwis2006-01-291-3/+14
|
* Explicitly close the server socket.Martin v. Löwis2006-01-291-0/+2
|
* Added a test for the ability to specify a class attribute in Formatter ↵Vinay Sajip2006-01-201-16/+64
| | | | configuration. Contributed by Shane Hathaway.
* Added test for fileConfig. Contributed by Shane Hathaway.Vinay Sajip2006-01-161-1/+101
|
* test_main(): Restore the original root logger level after runningTim Peters2005-12-301-0/+9
| | | | | | | | | | 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).
* Close handlers and tidy up loggers by removing closed handlers - to avoid ↵Vinay Sajip2004-08-041-5/+11
| | | | problems when run twice (SF #1002537)
* Copyright year changedVinay Sajip2004-06-021-1/+1
|
* Socket handler closed prior to end of test.Vinay Sajip2004-02-201-0/+1
|
* locale-restoration code: Don't leave comparison to None implicit. ForTim Peters2003-07-231-1/+1
| | | | | 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.
* 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.
* SF patch #761519: Fixes for bugs 760703 and 757821Raymond Hettinger2003-06-271-2/+1
| | | | | | | | | | | | | | | | | | 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).
* Change from a threading.Condition object to a threading.Event object forBrett Cannon2003-04-301-6/+3
| | | | | | | 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 .
* Merge back from r23b1-branchGuido van Rossum2003-04-261-0/+2
|
* New version from Vinaj, should solve the threading problems (hopefully).Guido van Rossum2003-04-251-5/+16
|
* SF patch #687683, Patches to logging (updates from Vinay)Neal Norwitz2003-02-181-2/+4
| | | | | | Mostly rename WARN -> WARNING Other misc tweaks Update tests (not in original patch)
* Fix from Vinaj for the "writing to closed file" errors. SF 670390.Guido van Rossum2003-01-211-10/+14
|
* On Mac OS X calling setlocale will raise locale.Error. This isn't fatal,Jack Jansen2003-01-151-1/+2
| | | | so just continue testing. Fixes #668787.
* At least one Solaris box in the snake farm only supports "C" locale.Neal Norwitz2003-01-051-1/+5
| | | | Adding try/except allows the test to pass
* SF #660795Neal Norwitz2003-01-021-0/+459
Add a test for logging from Vinay Sajip (module author)