diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2013-04-21 13:38:11 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-04-21 13:38:11 -0400 |
| commit | 70f663dc0ae6f8e663c0e048796f837cf0ef2983 (patch) | |
| tree | e8d849214128f5964dfaefe3c940329fa0bf35de /coverage | |
| parent | f5cfe193a73b08990fddd888167b6c6336b6803c (diff) | |
| download | python-coveragepy-git-70f663dc0ae6f8e663c0e048796f837cf0ef2983.tar.gz | |
Don't touch files as unexecuted if they were omitted. Fixes #218.
Diffstat (limited to 'coverage')
| -rw-r--r-- | coverage/control.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/coverage/control.py b/coverage/control.py index afb61370..09bd75fc 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 |
