diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-28 08:02:45 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-28 08:02:45 -0500 |
commit | c084f8c0e6c2b94df2d6c0a59036254f93811ddd (patch) | |
tree | 4140b3c5b0900813e650a619330043dc6e7df876 /doc/branch.rst | |
parent | f80837ae0385019de7b9a3d50a286a5fce0dfb46 (diff) | |
download | python-coveragepy-git-c084f8c0e6c2b94df2d6c0a59036254f93811ddd.tar.gz |
Doc tweaking, part 47
Diffstat (limited to 'doc/branch.rst')
-rw-r--r-- | doc/branch.rst | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/branch.rst b/doc/branch.rst index 087334ba..262ce1a5 100644 --- a/doc/branch.rst +++ b/doc/branch.rst @@ -36,17 +36,17 @@ To measure branch coverage, run coverage.py with the ``--branch`` flag:: coverage run --branch myprog.py -When you report on the results with "coverage report" or "coverage html", the -percentage of branch possibilities taken will be included in the percentage -covered total for each file. The coverage percentage for a file is the -actual executions divided by the execution opportunities. Each line in the -file is an execution opportunity, as is each branch destination. +When you report on the results with ``coverage report`` or ``coverage html``, +the percentage of branch possibilities taken will be included in the percentage +covered total for each file. The coverage percentage for a file is the actual +executions divided by the execution opportunities. Each line in the file is an +execution opportunity, as is each branch destination. The HTML report gives information about which lines had missing branches. Lines that were missing some branches are shown in yellow, with an annotation at the far right showing branch destination line numbers that were not exercised. -The XML report produced by "coverage xml" also includes branch information, +The XML report produced by ``coverage xml`` also includes branch information, including separate statement and branch coverage percentages. Each line is annotated with @@ -59,9 +59,11 @@ and destination for each transition from one line to another. Static analysis of the compiled bytecode provides a list of possible transitions. Comparing the measured to the possible indicates missing branches. -The idea of tracking how lines follow each other was from C. Titus Brown. +The idea of tracking how lines follow each other was from `Titus Brown`__. Thanks, Titus! +__ http://ivory.idyll.org/blog + Excluding code -------------- |