diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-06-16 10:54:43 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-06-16 10:54:43 -0400 |
commit | 5b77955729a28a4e1b4a1ffc02f65f2c64b2a184 (patch) | |
tree | 2be7cfe2585522e436efca8f1f46f44f11b739bd /coverage/collector.py | |
parent | 9ee2ff1a4b21d73524fa24453f089dcf406bccdb (diff) | |
download | python-coveragepy-5b77955729a28a4e1b4a1ffc02f65f2c64b2a184.tar.gz |
Correct the comment describing .should_trace_cache
Diffstat (limited to 'coverage/collector.py')
-rw-r--r-- | coverage/collector.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/coverage/collector.py b/coverage/collector.py index 1925007..4cb0019 100644 --- a/coverage/collector.py +++ b/coverage/collector.py @@ -135,9 +135,14 @@ class Collector(object): self.plugin_data = {} - # A cache of the results from should_trace, the decision about whether - # to trace execution in a file. A dict of filename to (filename or - # None). + # The .should_trace_cache attribute is a cache from filenames to + # coverage.FileDisposition objects, or None. When a file is first + # considered for tracing, a FileDisposition is obtained from + # Coverage.should_trace. Its .trace attribute indicates whether the + # file should be traced or not. If it should be, a plugin with dynamic + # filenames can decide not to trace it based on the dynamic filename + # being excluded by the inclusion rules, in which case the + # FileDisposition will be replaced by None in the cache. if env.PYPY: import __pypy__ # pylint: disable=import-error # Alex Gaynor said: |