summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-12 00:01:59 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-12 00:01:59 -0500
commit13765fe075fd9c7075b130f76317972da87f2b9b (patch)
tree762eb6db78ad0f01ca82fcafdb6d7538ca83ae94 /coverage/control.py
parentb5ad7d3f30ad817a0e126cdad1be3ae0df6910c6 (diff)
downloadpython-coveragepy-git-13765fe075fd9c7075b130f76317972da87f2b9b.tar.gz
Clarify when coverage measurement actually starts. #102
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 20afff5e..6f15bf9d 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -25,7 +25,7 @@ class coverage(object):
cov = coverage()
cov.start()
- #.. blah blah (run your code) blah blah ..
+ #.. call your code ..
cov.stop()
cov.html_report(directory='covhtml')
@@ -320,7 +320,12 @@ class coverage(object):
self.data.read()
def start(self):
- """Start measuring code coverage."""
+ """Start measuring code coverage.
+
+ Coverage measurement actually occurs in functions called after `start`
+ is invoked. Statements in the same scope as `start` won't be measured.
+
+ """
if self.run_suffix:
# Calling start() means we're running code, so use the run_suffix
# as the data_suffix when we eventually save the data.