Mercurial > bitten > bitten-test
changeset 662:b00da52e942f
0.6dev: Adding docs for `<python:figleaf>` command. Closes #438.
author | osimons |
---|---|
date | Wed, 02 Sep 2009 23:50:11 +0000 |
parents | 8931a5ebdc7a |
children | 820583ca4dc3 |
files | bitten/build/pythontools.py doc/commands.txt |
diffstat | 2 files changed, 45 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/build/pythontools.py +++ b/bitten/build/pythontools.py @@ -375,6 +375,14 @@ log.warning('Error opening coverage summary file (%s)', e) def figleaf(ctxt, summary=None, include=None, exclude=None): + """Extract data from a ``Figleaf`` run. + + :param ctxt: the build context + :type ctxt: `Context` + :param summary: path to the file containing the coverage summary + :param include: patterns of files or directories to include in the report + :param exclude: patterns of files or directories to exclude from the report + """ from figleaf import get_lines coverage = xmlio.Fragment() try:
--- a/doc/commands.txt +++ b/doc/commands.txt @@ -796,6 +796,43 @@ <python:trace summary="build/trace.out" coverdir="build/coverage" /> + +-------------------- +``<python:figleaf>`` +-------------------- + +Extracts coverage information recorded by Figleaf_. + +.. _figleaf: http://darcs.idyll.org/~t/projects/figleaf/doc/ + +Parameters +---------- + ++--------------+-------------------------------------------------------------+ +| Name | Description | ++==============+=============================================================+ +| ``summary`` | Path to the summary file written by ``figleaf``, | +| | relative to the project source directory. | ++--------------+-------------------------------------------------------------+ +| ``include`` | List of glob patterns (separated by space) that specify | +| | which Python file should be included in the coverage report | ++--------------+-------------------------------------------------------------+ +| ``exclude`` | List of glob patterns (separated by space) that specify | +| | which Python file should be excluded from the coverage | +| | report | ++--------------+-------------------------------------------------------------+ + +Examples +-------- + +.. code-block:: xml + + <step id="figleaf" description="Figleaf coverage"> + <sh:exec executable="figleaf" args="setup.py test"/> + <python:figleaf summary=".figleaf" exclude="build/* setup* */tests/*"/> + </step> + + ------------------- ``<python:pylint>`` -------------------