summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-04-21 13:38:11 -0400
committerNed Batchelder <ned@nedbatchelder.com>2013-04-21 13:38:11 -0400
commit129e8aea0133f173f5014a549ce372dde1fcd5b6 (patch)
tree9f1d900f5646b0a740e7f941a651a844426e4df7 /coverage/control.py
parentb33f839a07a6ad36464330d98822bc0341c4858f (diff)
downloadpython-coveragepy-129e8aea0133f173f5014a549ce372dde1fcd5b6.tar.gz
Don't touch files as unexecuted if they were omitted. Fixes #218.
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/coverage/control.py b/coverage/control.py
index afb6137..09bd75f 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -499,6 +499,12 @@ class coverage(object):
for src in self.source:
for py_file in find_python_files(src):
py_file = self.file_locator.canonical_filename(py_file)
+
+ if self.omit_match and self.omit_match.match(py_file):
+ # Turns out this file was omitted, so don't pull it
+ # back in as unexecuted.
+ continue
+
self.data.touch_file(py_file)
self._measured = False