diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-12 00:01:59 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-12 00:01:59 -0500 |
commit | 13765fe075fd9c7075b130f76317972da87f2b9b (patch) | |
tree | 762eb6db78ad0f01ca82fcafdb6d7538ca83ae94 /coverage | |
parent | b5ad7d3f30ad817a0e126cdad1be3ae0df6910c6 (diff) | |
download | python-coveragepy-git-13765fe075fd9c7075b130f76317972da87f2b9b.tar.gz |
Clarify when coverage measurement actually starts. #102
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/control.py | 9 |
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. |