Merge lp:~allenap/launchpad/sensible-test-ids-for-doctests into lp:launchpad
Proposed by
Gavin Panella
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 12734 |
Proposed branch: | lp:~allenap/launchpad/sensible-test-ids-for-doctests |
Merge into: | lp:launchpad |
Diff against target: |
63 lines (+12/-4) 3 files modified
lib/canonical/launchpad/testing/systemdocs.py (+8/-0) lib/canonical/launchpad/testing/tests/test_pages.py (+1/-1) lib/canonical/launchpad/testing/tests/test_systemdocs.py (+3/-3) |
To merge this branch: | bzr merge lp:~allenap/launchpad/sensible-test-ids-for-doctests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+55959@code.launchpad.net |
Commit message
[r=jml][bug=682771][no-qa] To avoid conflicts, LayeredDocFileSuite now patches test cases to use the filename with path as test ID.
Description of the change
From a new comment in LayeredDocFileS
DocFileTest insists on using the basename of the file as the test
ID. This causes conflicts when two doctests have the same filename,
so we patch the id() method on the test cases.
This branch does not fix the related bug - it does not modify the test
runner - but it does alleviate the symptoms. Something like this is
needed before the linked bug can be fixed in any case.
To post a comment you must log in.
This is awesome. In addition to making parallelizing tests that little bit more effective, you can tweak it just a little to normalize the path that is the docstring id(). That would make "./bin/test -cvvt doc/branch.txt" actually work!
test.id = lambda: os.path. normpath( repr(test) )
Works for me, but you could do something fancier, I guess.