summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/coverage/control.py b/coverage/control.py
index 9ac7fea9..1ed3df54 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -31,7 +31,8 @@ class coverage(object):
"""
def __init__(self, data_file=None, data_suffix=None, cover_pylib=None,
- auto_data=False, timid=None, branch=None, config_file=True, omit_prefixes=None, include_prefixes=None):
+ auto_data=False, timid=None, branch=None, config_file=True,
+ omit_prefixes=None, include_prefixes=None):
"""
`data_file` is the base name of the data file to use, defaulting to
".coverage". `data_suffix` is appended (with a dot) to `data_file` to
@@ -190,10 +191,11 @@ class coverage(object):
if canonical.startswith(self.cover_prefix):
return False
+ # Check the file against the include and omit prefixes.
if self.include_prefixes:
for prefix in self.include_prefixes:
if canonical.startswith(prefix):
- return canonical
+ break
else:
return False
for prefix in self.omit_prefixes: