Merge lp:~frankban/launchpad/bug-993510 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15318 |
Proposed branch: | lp:~frankban/launchpad/bug-993510 |
Merge into: | lp:launchpad |
Diff against target: |
51 lines (+18/-1) 2 files modified
lib/lp/testing/__init__.py (+1/-1) lib/lp/testing/tests/test_testcase.py (+17/-0) |
To merge this branch: | bzr merge lp:~frankban/launchpad/bug-993510 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Benji York (community) | code | Approve | |
Review via email: mp+107630@code.launchpad.net |
Description of the change
= Summary =
Log handlers are removed before each test because tests should not depend on global logging config.
== Changes ==
Iterate over a copy of the handler list, so that the original list is not affected by the .remove calls and all handlers are correctly removed.
NO QA
== Lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
== Tests ==
$ bin/test -vvc --load-list ../s6
Running tests at level 1
Running lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Set up lp.testing.
Running:
lp.archivepubl
lp.services.
Ran 2 tests with 0 failures and 0 errors in 2.726 seconds.
Tearing down left over layers:
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Tear down lp.testing.
Looks good. I see why this would be a problem.
I wonder if we should have a test for this behaviour.