Add support for .pytest.ini as an alternative to pytest.ini#9988
Merged
nicoddemus merged 5 commits intopytest-dev:mainfrom Jun 14, 2022
Merged
Add support for .pytest.ini as an alternative to pytest.ini#9988nicoddemus merged 5 commits intopytest-dev:mainfrom
nicoddemus merged 5 commits intopytest-dev:mainfrom
Conversation
Added config search option of ".pytest.ini" in addition to "pytest.ini"
Hidden version of pytest.ini documented.
Added hidden configuration file info to changelog.
Added myself to AUTHORS file.
nicoddemus
requested changes
May 25, 2022
Member
nicoddemus
left a comment
There was a problem hiding this comment.
LGTM, but we need an explicit test that loads from a .pytest.ini file to avoid regressions.
For an example see test_pyproject_toml in test_config.py, I think we can create a new test which follows the same approach taken there.
Member
|
Took the liberty of adding the test myself (we just needed to add a new parameter to a parametrized test actually). Thanks @grintor! |
nicoddemus
approved these changes
Jun 14, 2022
nicoddemus
reviewed
Jun 14, 2022
| """ | ||
| [{section}] | ||
| minversion = 1.0 | ||
| minversion = 3.36 |
Member
There was a problem hiding this comment.
Used a more unusual version number than 1.0 just to be more clear that we are getting the actual value (1.0 seems a bit like it could be a default value).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for
.pytest.inias an alternative topytest.ini. Closes #9987