FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for .pytest.ini as an alternative to pytest.ini by grintor · Pull Request #9988 · pytest-dev/pytest · GitHub

Add support for .pytest.ini as an alternative to pytest.ini - #9988

Merged
nicoddemus merged 5 commits into
pytest-dev:mainfrom
grintor:patch-1
Jun 14, 2022
Merged

Add support for .pytest.ini as an alternative to pytest.ini#9988
nicoddemus merged 5 commits into
pytest-dev:mainfrom
grintor:patch-1

Conversation

grintor commented May 23, 2022

Copy link
Copy Markdown
Contributor

Adds support for .pytest.ini as an alternative to pytest.ini. Closes #9987

grintor added 4 commits May 23, 2022 09:38
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.

The-Compiler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Seems like a good idea!

grintor requested a review from The-Compiler May 24, 2022 11:23

nicoddemus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

nicoddemus added this to the 7.2 milestone Jun 14, 2022

Copy link
Copy Markdown
Member

Took the liberty of adding the test myself (we just needed to add a new parameter to a parametrized test actually).

Thanks @grintor!

Comment thread testing/test_config.py
"""
[{section}]
minversion = 1.0
minversion = 3.36

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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).

nicoddemus changed the title Allow configuration file to be hidden Add support for .pytest.ini as an alternative to pytest.ini Jun 14, 2022
nicoddemus merged commit fab696d into pytest-dev:main Jun 14, 2022
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offer alternative config filename ".pytest.ini"

3 participants


Back | FazBrowse Home | New Git URL