From 105aea7eba5d1f062e41a1f1052823c89c1d0908 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 14 Dec 2011 19:07:49 -0500 Subject: Guido pointed out that these docs were wrong. --- doc/branch.rst | 5 +++-- doc/excluding.rst | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/branch.rst b/doc/branch.rst index d9b61629..3ee09aa3 100644 --- a/doc/branch.rst +++ b/doc/branch.rst @@ -7,6 +7,7 @@ Branch coverage measurement :history: 20091127T201300, new for version 3.2 :history: 20100725T211700, updated for 3.4. :history: 20110604T181700, updated for 3.5. +:history: 20111214T181800, Fix a bug that Guido pointed out. .. highlight:: python :linenothreshold: 5 @@ -109,12 +110,12 @@ tell coverage.py that you don't want them flagged by marking them with a pragma:: i = 0 - while i < 999999999: # pragma: no partial + while i < 999999999: # pragma: no branch if eventually(): break Here the while loop will never complete because the break will always be taken at some point. Coverage.py can't work that out on its own, but the -"no partial" pragma indicates that the branch is known to be partial, and +"no branch" pragma indicates that the branch is known to be partial, and the line is not flagged. diff --git a/doc/excluding.rst b/doc/excluding.rst index 9a3b5e7d..f1262c35 100644 --- a/doc/excluding.rst +++ b/doc/excluding.rst @@ -94,7 +94,7 @@ Note that when using the ``exclude_lines`` option in a configuration file, you are taking control of the entire list of regexes, so you need to re-specify the default "pragma: no cover" match if you still want it to apply. -A similar pragma, "no partial", can be used to tailor branch coverage +A similar pragma, "no branch", can be used to tailor branch coverage measurement. See :ref:`branch` for details. -- cgit v1.2.1