FakeLogger is broken
Bug #302183 reported by
Barry Warsaw
This bug report is a duplicate of:
Bug #125637: Replace MockLoggers in tests with fixtures.FakeLogger.
Edit
Remove
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
lib/canonical/
"""Emulates a proper logger, just printing everything out to stdout.
Used exclusively in doc tests."""
Sadly, it does not "emulate[] a proper logger" because it does not interpolate the positional arguments into a format string. Thus, this horror is necessary to capture logger output for tests:
def message(self, prefix, *stuff, **kws):
fmt = stuff[0]
print >> self.io, prefix, fmt % stuff[1:]
We should fix FakeLogger to actually emulate the builtin logger, and we should also consolidate our testing loggers so that we have but one in our tree.
Changed in launchpad-foundations: | |
status: | New → Triaged |
importance: | Undecided → Low |
To post a comment you must log in.