need a test helper to reliably capture warnings and mutters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
In https:/
This looks a lot like something that ought to be split out
into a more generic test helper. I think we accumulate too much stuff
redundantly within individual test cases, and also we rely a bit too
much on overrideAttr to test things. Someone could easily break this
behaviour, not plain unqualified mutter() and then not be caught by
grep -nH -e overrideAttr\(trace :
./test_
./test_
./test_
./test_
./test_
./test_
./test_
./test_
./test_
./test_
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: check-for-breezy |
I agree about the proliferation of redundant stuff and a helper sounds like a good way to address that.
Regarding the use of overrideAttr for these cases, I think it's fine to use it as it means being minimally intrusive and focused on checking an expected behaviour (I quickly looked at the grep hits above and that's the case).
Regarding unqualified mutter(), well, without restarting the import argument, in the mp mentioned above, I *had* to use trace.mutter() (instead of mutter()) to fix the test failures.
Now, since trace is based on logging there may be other ways to achieve the same effect without requiring s/mutter/ trace.mutter/ and for tests we may accept to rely on the trace implementation respecting that.