Commit Graph

42 Commits

Author SHA1 Message Date
Vinay Sajip
213faca204 Issue #4384: Added logging integration with warnings module using captureWarnings(). This change includes a NullHandler which does nothing; it will be of use to library developers who want to avoid the "No handlers could be found for logger XXX" message which can appear if the library user doesn't configure logging. 2008-12-03 23:22:58 +00:00
Vinay Sajip
844f741039 Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging. 2008-09-09 13:42:08 +00:00
Vinay Sajip
65d66e1006 Issue #3772: Fixed regression problem in StreamHandler.emit(). 2008-09-04 07:31:21 +00:00
Vinay Sajip
6a2fd81316 Issue #3726: Allowed spaces in separators in logging configuration files. 2008-09-03 09:20:05 +00:00
Vinay Sajip
70fdc95b96 Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch. 2008-07-18 09:00:00 +00:00
Georg Brandl
e152a77d96 socketserver renaming reversal part 3: move the module into the right
place and fix all references to it.  Closes #2926.
2008-05-24 18:31:28 +00:00
Alexandre Vassalotti
d192c925ac Updated all import statements to use the new socketserver module name.
Renamed socketserver module in its own documentation.
Renamed documentation references.
2008-05-12 02:11:22 +00:00
Amaury Forgeot d'Arc
2aece57d7f Correctly call the base class tearDown();
otherwise running test_logging twice produce the errors we see on all buildbots
2008-03-29 01:42:31 +00:00
Brett Cannon
56c4debe0d Refactor test_logging to use unittest. This should finally solve the flakiness
issues.

Thanks to Antoine Pitrou for the patch.
2008-03-03 00:38:58 +00:00
Christian Heimes
c5f05e45cf Patch #2167 from calvin: Remove unused imports 2008-02-23 17:40:11 +00:00
Georg Brandl
57826cf9f8 #2165: fix test_logging failure on some machines. 2008-02-23 15:06:25 +00:00
Brett Cannon
f9db8a3a20 Move test_logging over to doctest.
Thanks to Christopher White from GHOP.
2008-02-17 01:59:18 +00:00
Vinay Sajip
a5e764873a Fix resource leak reported in SF #1516995. 2007-03-11 18:32:07 +00:00
Georg Brandl
f3e304297e Repair logging test spew caused by rev. 51206. 2006-08-12 08:32:02 +00:00
Vinay Sajip
a09803329c Added duplicate call to fileConfig() to ensure that it cleans up after itself correctly. 2006-07-01 10:47:20 +00:00
Georg Brandl
de9b624fb9 Bug #1473625: stop cPickle making float dumps locale dependent in protocol 0.
On the way, add a decorator to test_support to facilitate running single
test functions in different locales with automatic cleanup.
2006-04-30 11:13:56 +00:00
Neal Norwitz
5bab0f8872 Backout the last hack and add in this new one.
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.
2006-03-05 02:16:12 +00:00
Neal Norwitz
67dfb6f086 I think the test_logging failure on Solaris is timing related. We don't
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.
2006-03-03 21:53:14 +00:00
Vinay Sajip
1eb77a50c8 Added lock acquisition/release around shared data structure manipulation 2006-02-09 08:31:00 +00:00
Vinay Sajip
f0a95eca45 Saved and restored logging._handlerList at the same time as saving/restoring logging._handlers. 2006-02-07 13:44:48 +00:00
Neal Norwitz
55cd82fe0a Get test_logging to not hang when running under regrtest.py -R ::
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.
2006-02-05 08:21:08 +00:00
Tim Peters
249c7b050b Whitespace normalization. 2006-01-29 22:50:26 +00:00
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