From 360c7725d4a82e5ad7b9ebc2e9aa459b39f5c2b4 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 16 Jan 2016 11:36:08 -0500 Subject: Update the docs to the new way branch coverage works --- doc/branch.rst | 4 ++-- doc/howitworks.rst | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/branch.rst b/doc/branch.rst index 9cee70bf..f95f1d47 100644 --- a/doc/branch.rst +++ b/doc/branch.rst @@ -64,8 +64,8 @@ How it works When measuring branches, coverage.py collects pairs of line numbers, a source 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. +of the source 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 `Titus Brown`__. Thanks, Titus! diff --git a/doc/howitworks.rst b/doc/howitworks.rst index 74747e80..6253f44a 100644 --- a/doc/howitworks.rst +++ b/doc/howitworks.rst @@ -73,12 +73,9 @@ difference between the executable lines, and the executed lines, are the lines that were not executed. The same principle applies for branch measurement, though the process for -determining possible branches is more involved. Coverage.py reads the bytecode -of the compiled Python file, and decides on a set of possible branches. -Unfortunately, this process is inexact, and there are some `well-known cases`__ -that aren't correct. - -.. __: https://bitbucket.org/ned/coveragepy/issues?status=new&status=open&component=branch +determining possible branches is more involved. Coverage.py uses the abstract +syntax tree of the Python source file to determine the set of possible +branches. Reporting -- cgit v1.2.1