Skip to content

addopts must be within [pytest] (not [tools:pytest]) when in setup.cfg #4432

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

Closed
reece opened this issue Nov 21, 2018 · 2 comments
Closed

addopts must be within [pytest] (not [tools:pytest]) when in setup.cfg #4432

reece opened this issue Nov 21, 2018 · 2 comments

Comments

@reece
Copy link

reece commented Nov 21, 2018

pytest 4.0.0, pytest-cov 2.6.0

pytest does not recognize the addopts or doctest_optionflags options in the following setup.cfg:

[tools:pytest]
addopts = --doctest-modules --doctest-glob='*.rst'
doctest_optionflags = ALLOW_UNICODE ALLOW_BYTES ELLIPSIS NORMALIZE_WHITESPACE

Renaming the section to pytest causes both options to be recognized and the following warning:

_pytest/config/findpaths.py:44: RemovedInPytest4Warning: [pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.

I am invoking pytest as pytest -v (i.e., not specifying a config, and therefore this appears to be distinct from #1831).

No other config files are present.

@reece
Copy link
Author

reece commented Nov 21, 2018

Mea culpa. I worked on this for hours. Now I can't reproduce it. No idea why, but closing now. Sorry for the chatter.

@reece reece closed this as completed Nov 21, 2018
@blueyed
Copy link
Contributor

blueyed commented Nov 21, 2018

JFI: pytest prints the inifile in its header - so check that in general.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants