Opened 7 years ago

Last modified 7 years ago

#5946 enhancement new

Almost all twisted.test.test_log tests should use custom LogPublisher instance, rather than global publisher

Reported by: Itamar Turner-Trauring Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Jean-Paul Calderone Branch:


Some test_log create a new LogPublisher for their tests; this is useful among other reasons because it doesn't require TestCase.flushLoggedErrors because there's no interaction with global logging state. There are some existing tests that don't do so, and should be ported.

This may require moving functionality from twisted.python.log.err to twisted.python.log.LogPublisher.err.

Change History (1)

comment:1 Changed 7 years ago by Itamar Turner-Trauring

Cc: Jean-Paul Calderone added

Also, it looks like a number of tests in test_log don't clean up well after themselves, changing global log state. In particular the ones using log.startLogging, but quite possibly others as well. This is causing erroneous test errors on Python 3. Disabling test case by test case should find out which; possibly that problem won't require this whole ticket, or will involve code not in LogPublisher.

Note: See TracTickets for help on using tickets.