-
-
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
Consider pyproject.toml files for config if no other config files were found #11962
Conversation
…e found Today `pyproject.toml` is the standard for declaring a Python project root, so seems reasonable to consider it for the ini configuration (and specially `rootdir`) in case we do not find other suitable candidates. Related to pytest-dev#11311
eedc86c
to
b599919
Compare
Finally, a ``pyproject.toml`` file will be considered the ``configfile`` if no other match was found, in this case | ||
even if it does not contain a ``[tool.pytest.ini_options]`` table (this was added in ``8.1``). |
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.
Finally, a ``pyproject.toml`` file will be considered the ``configfile`` if no other match was found, in this case | |
even if it does not contain a ``[tool.pytest.ini_options]`` table (this was added in ``8.1``). | |
Finally, a ``pyproject.toml`` file will be considered the ``configfile`` if no other match was found, | |
even if it does not contain a ``[tool.pytest.ini_options]`` table (this was added in ``8.1``). It will thus define the root dir. |
It was unclear for me at first what the purpose of a pyproject.toml without any pytest related config inside was.
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.
Thanks! Used a slightly different approach, moving this to its own line as it is independent from pyproject.toml
itself.
…e found (pytest-dev#11962) Today `pyproject.toml` is the standard for declaring a Python project root, so seems reasonable to consider it for the ini configuration (and specially `rootdir`) in case we do not find other suitable candidates. Related to pytest-dev#11311
Today
pyproject.toml
is the standard for declaring a Python project root, so seems reasonable to consider it for the ini configuration (and speciallyrootdir
) in case we do not find other suitable candidates.Related to #11311