-
-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include-ignored warning when using run.source with report.include #621
Comments
Original comment by Daniel Hahler (Bitbucket: blueyed, GitHub: blueyed) Shouldn't diff --git a/coverage/config.py b/coverage/config.py
index [50027274 (bb)](https://bitbucket.org/ned/coveragepy/commits/50027274)..2209e25a [100644 (bb)](https://bitbucket.org/ned/coveragepy/commits/100644)
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -178,10 +178,6 @@ def __init__(self):
self.attempted_config_files = []
self.config_files = []
- # Defaults for [run] and [report]
- self._include = None
- self._omit = None
-
# Defaults for [run]
self.branch = False
self.concurrency = None
@@ -325,9 +321,9 @@ def from_file(self, filename, our_file):
('data_file', 'run:data_file'),
('debug', 'run:debug', 'list'),
('disable_warnings', 'run:disable_warnings', 'list'),
- ('_include', 'run:include', 'list'),
+ ('run_include', 'run:include', 'list'),
('note', 'run:note'),
- ('_omit', 'run:omit', 'list'),
+ ('run_omit', 'run:omit', 'list'),
('parallel', 'run:parallel', 'boolean'),
('plugins', 'run:plugins', 'list'),
('source', 'run:source', 'list'),
@@ -337,8 +333,8 @@ def from_file(self, filename, our_file):
('exclude_list', 'report:exclude_lines', 'regexlist'),
('fail_under', 'report:fail_under', 'int'),
('ignore_errors', 'report:ignore_errors', 'boolean'),
- ('_include', 'report:include', 'list'),
- ('_omit', 'report:omit', 'list'),
+ ('report_include', 'report:include', 'list'),
+ ('report_omit', 'report:omit', 'list'),
('partial_always_list', 'report:partial_branches_always', 'regexlist'),
('partial_list', 'report:partial_branches', 'regexlist'),
('precision', 'report:precision', 'int'),
@@ -469,12 +465,6 @@ def read_coverage_config(config_file, **kwargs):
if config_read:
break
- for attr in ('_omit', '_include'):
- value = getattr(config, attr)
- if value is not None:
- for section in ('run', 'report'):
- setattr(config, section + attr, value)
-
# 3) from environment variables:
env_data_file = os.environ.get('COVERAGE_FILE')
if env_data_file: |
Original comment by Daniel Hahler (Bitbucket: blueyed, GitHub: blueyed) This warnings causes test failures for me when I am capturing output, and pytest-cov triggers the |
Hmm, I see what you mean. I'll look into this. |
Fixed in 1031ead7ca4c (bb) What I was forgetting was that there's no need to connect the run and report settings together. Report inclusion and omission will default to the run settings by virtue of the data that the run phase collected. Thanks! :) |
Don't confuse run-include with report-include (and also omit). Fixes #621 and #622. → <<cset 1031ead7ca4c (bb)>> |
This was included in coverage.py v4.5, released today. |
Originally reported by Daniel Hahler (Bitbucket: blueyed, GitHub: blueyed)
Using the following
.coveragerc
should not cause a warning during run, should it?This appeared with coveragepy 4.4.2 and appears to be a side effect of fixing https://bitbucket.org/ned/coveragepy/issues/265.
The text was updated successfully, but these errors were encountered: