LaunchpadScript constructor breaks logging for subsequent tests

Bug #694152 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

LaunchpadScript changes the global root logger to print any logged messages to stderr. While this is great for actual scripts, it means that whenever we invoke LaunchpadScript in a test run, any subsequent tests that log to *any* logger that is set to propagate (the default) will print to stderr.

This is ugly and makes debugging harder by adding extraneous noise.

An example of this is gettext_po_parser.txt, which emits nothing when run by itself, but emits to stderr during a full test run.

Changed in launchpad:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Robert Collins (lifeless) wrote :

Tests should probably use the FakeLogger fixture from fixtures if they want logging message anyhow; tests that construct a LaunchpadScript should isolate it and restore afterward.

Changed in launchpad:
importance: High → Low
tags: added: build-infrastructure
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.