-
Notifications
You must be signed in to change notification settings - Fork 932
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
Turn on xfail_strict = true
for all python packages
#16977
Conversation
This is where we are configuring all the other tools.
When pytest.ini exists, other config files are not looked at. So we temporarily lost the xfail_strict = true setting.
This is where we are configuring all the other tools.
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.
Totally support consolidating all these settings in pyproject.toml
... that mix of pytest.ini
and pyproject.toml
here has tripped me up in the past 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.
Some optional options to set in a follow-up if interested to make pytest more strict
empty_parameter_set_mark = "fail_at_collect"
: https://docs.pytest.org/en/stable/reference/reference.html#confval-empty_parameter_set_markaddopts = "--strict-config --strict-markers"
And fail at collect for empty parameter sets in parametrize.
I added these, let's see |
/merge |
Description
The cudf tests already treat tests that are expected to fail but pass as errors, but at the time we introduced that change, we didn't do the same for the other packages. Do that now, it turns out there are only a few xpassing tests.
While here, it turns out that having multiple different pytest configuration files does not work.
pytest.ini
takes precedence over other options, and it's "first file wins". Consequently, the merge of #16851 turned offxfail_strict = true
(and other options) for many of the subpackages.To fix this, migrate all pytest configuration into the appropriate section of the
pyproject.toml
files, so that all tool configuration lives in the same place. We also add a section in the developer guide to document this choice.xfail_strict=true
in all subpackages #12391Checklist