From 70f663dc0ae6f8e663c0e048796f837cf0ef2983 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 21 Apr 2013 13:38:11 -0400 Subject: Don't touch files as unexecuted if they were omitted. Fixes #218. --- coverage/control.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'coverage/control.py') 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 -- cgit v1.2.1