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 | 62c2906451fc92df3011aa0ef30717be9a40298e (patch) | |
tree | 56416b1ae30982afb4f8fda374608352f92af347 /coverage/control.py | |
parent | c80eedd40b8650066928a94c7ae3680b38a10e67 (diff) | |
download | python-coveragepy-62c2906451fc92df3011aa0ef30717be9a40298e.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 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. |