summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-10-24 06:35:15 -0400
committerNed Batchelder <ned@nedbatchelder.com>2017-10-24 06:35:15 -0400
commit62c2906451fc92df3011aa0ef30717be9a40298e (patch)
tree56416b1ae30982afb4f8fda374608352f92af347 /coverage
parentc80eedd40b8650066928a94c7ae3680b38a10e67 (diff)
downloadpython-coveragepy-62c2906451fc92df3011aa0ef30717be9a40298e.tar.gz
Move the --source and --include check so it's only during 'run'
Diffstat (limited to 'coverage')
-rw-r--r--coverage/control.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/coverage/control.py b/coverage/control.py
index c2fe806..e9691b8 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -347,8 +347,6 @@ class Coverage(object):
if self.pylib_paths:
self.pylib_match = TreeMatcher(self.pylib_paths)
if self.include:
- if self.source or self.source_pkgs:
- print("--include is ignored because --source is set")
self.include_match = FnmatchMatcher(self.include)
if self.omit:
self.omit_match = FnmatchMatcher(self.omit)
@@ -685,6 +683,9 @@ class Coverage(object):
"""
self._init()
+ if self.include:
+ if self.source or self.source_pkgs:
+ print("--include is ignored because --source is set")
if self.run_suffix:
# Calling start() means we're running code, so use the run_suffix
# as the data_suffix when we eventually save the data.