diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-10-24 06:35:15 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-10-24 06:35:15 -0400 |
commit | feaca393151ff97a7dbd6981af2265517ed7767a (patch) | |
tree | 412cb5eb4984ee387d912277478d2f3a884a129a /coverage/control.py | |
parent | 6cee6103a399dfb00f95962033624855642fd722 (diff) | |
download | python-coveragepy-git-feaca393151ff97a7dbd6981af2265517ed7767a.tar.gz |
Move the --source and --include check so it's only during 'run'
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 5 |
1 files changed, 3 insertions, 2 deletions
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. |