Merge lp:~bac/testrepository/bug-949950 into lp:~testrepository/testrepository/trunk
Proposed by
Brad Crittenden
on 2012-04-17
| Status: | Rejected |
|---|---|
| Rejected by: | Jonathan Lange on 2012-04-18 |
| Proposed branch: | lp:~bac/testrepository/bug-949950 |
| Merge into: | lp:~testrepository/testrepository/trunk |
| Diff against target: |
145 lines (+35/-13) 4 files modified
testrepository/commands/run.py (+7/-8) testrepository/tests/test_ui.py (+21/-4) testrepository/tests/ui/test_cli.py (+1/-0) testrepository/ui/cli.py (+6/-1) |
| To merge this branch: | bzr merge lp:~bac/testrepository/bug-949950 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jonathan Lange | 2012-04-17 | Disapprove on 2012-04-17 | |
|
Review via email:
|
|||
Description of the Change
As requested, a '--subunit' option was added to the run command to get results in subunit format.
The change to test_cli.py was required or 'make_results' was unhappy due to not having an 'options' attribute, so the tests were made more robust.
Apologies for some of the formatting changes. The trailing whitespace was automatically cleaned up by my emacs save hook (not a bad thing) and the others were me being OCD. Sorry for the somewhat bloated diff.
To post a comment you must log in.
| Brad Crittenden (bac) wrote : | # |
Thanks for the review Jono. I've created a new branch and merge proposal that addresses your issues. Please mark this one 'rejected'.

Hey Brad,
Thanks for submitting this. First up, no worries about the cleanups -- I'm really grateful that you took the time to do them.
We had a bit of a chat about this on IRC. Here are the highlights:
* --subunit here only shows timestamps and failing tests, rather than the full test run. This isn't the behaviour you want.
* Probably the right thing to do is push the call to TestResultFilter that's in load.py down into the UI make_result() method. This allows the UI to have full control over which tests are shown in the output. Note that this will probably have a bunch of annoying test fallout. My hunch is that this will make progress display easier too.
* I think that the default for --subunit should be as for the current output: only show failing tests. testr should then grow a new option for showing full results. --full-results is as good a spelling as any.
* Both --subunit and --full-results should be applied to both 'testr run' and 'testr load'.
* "Output collated results" is very parallel-run specific. Should probably say, "display results in subunit format" or similar.
* I haven't seen vars(x).get(y) before. I'm guessing this is equivalent to getattr(x, y, None)?
Thanks,
jml