From feaca393151ff97a7dbd6981af2265517ed7767a Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 24 Oct 2017 06:35:15 -0400 Subject: Move the --source and --include check so it's only during 'run' --- coverage/control.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coverage/control.py') diff --git a/coverage/control.py b/coverage/control.py index c2fe806c..e9691b89 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. -- cgit v1.2.1