-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
#3260 fix pytest section #3267
#3260 fix pytest section #3267
Conversation
_pytest/config.py
Outdated
sections = ['tool:pytest', 'pytest'] if is_cfg_file else ['pytest'] | ||
for section in sections: | ||
try: | ||
inicfg = iniconfig[section] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we never deprecated [pytest]
in custom configs, i believe we should either support both or target the features branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RonnyPfannschmidt fixed
I thought that #3086 deprecates [pytest] section in custom configs too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feuillemorte it is deprecated, but we will remove it only in 4.0. We should start issuing warnings here as well if users are using [pytest]
in setup.cfg
files, see:
Lines 1266 to 1267 in 2008554
if inibasename == 'setup.cfg' and warnfunc: | |
warnfunc('C1', SETUP_CFG_PYTEST) |
But we don't introduce new warnings in bug-fixes (we've broken test suites in the past because of that) so the introduction of this warning should be done in features
, in a separate task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #3268 with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicoddemus I see, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work @feuillemorte! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #3260
Bugfix: When you pass option "-c custom_config.cfg" section [tool:pytest] is now parses. And print warning if there is [pytest] section.