The coverage tool is still [http://darcs.idyll.org/~t/projects/figleaf/doc/ figleaf].
**Note that this is work in progress, figleaf doesn't work as expected yet, due to the presence of doctests, apparently.**
A few things were adapted so far:
- `doctest.testmod` was badly interfering with figleaf, making the latter believe nothing happened after the `testmod` line (which was not true as the suite did run)
- once `doctest.testmod` was no longer used, the `del __builtins__._` needed for ''Clean up after doctest or spambayes gets unhappy'' was no longer working and needed I suppose; removed it
- added the exclude pattern `\\lib\\`, useful on Windows
- no idea why, but running
{{{
FIGLEAF=figleaf python trac/tests/functional/testcases.py -v
}}}
worked, while
{{{
FIGLEAF=figleaf python trac/tests/functional/__init__.py -v
}}}
did not, on the command line - this is still not working from the Makefile?
Then, some niceties:
- added a `clear-coverage` target to remove stuff generated by figleaf
- added a `show-coverage` target to generate the HTML files showing the coverage for *.figleaf files generated up to now (and the files go in the `figleaf/` folder instead of the `html/` one)
- added `unit-test-coverage` and `functional-test-coverage` targets to build the coverage data for unit tests and functional tests respectively (`test-coverage` to do both)
- `make coverage` does a `clean-coverage test-coverage show-coverage` cycle