-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Define custom markers for pytest. #16652
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
Conversation
(I'm glad pytest no longer silently fails with unknown marks!) |
I'm glad you are glad... :) |
What evidence do you have that it's not taken into account? The test doesn't fall, so I'm not sure what I'll meant to be looking for. Thanks for any clues, @cmarmo! |
I have created a pull request into my master version, adding to all the builds a |
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 @cmarmo
I confirm that this removes the warning.
However the recommended way is to create a pytest.ini
file. (see https://docs.pytest.org/en/latest/example/markers.html#registering-markers)
The current solution is recommended when implementing plugins (https://docs.pytest.org/en/latest/writing_plugins.html#registering-markers) which isn't really our use-case here.
Any thought against adding a pytest.ini
? I guess we'd have to ship it in the source dist as well.
LGTM anyway
If it works in |
The idea was not to change the dist, indeed... |
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
For the sake of completeness this was my ref link: |
Is there still an issue with the windows CI? |
Sorry it took some time, Azure builds are bugging for me, I had to run pipelines manually... so yes there is still an issue with Windows py36_pip_openblas_32bit (win32 -- Python 3.6.8, pytest-5.4.1): the |
Hm, no idea. It doesn't seem to be related to pytest's version because I have the same locally. Could be a pytest bug? |
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.
Reference Issues/PRs
Fix part of #16651:
PytestUnknownMarkWarning
intest_gradient_boosting.py
What does this implement/fix? Explain your changes.
Add marker custom definition in
conftest.py
.For now this works only for builds using python != 3.7.
See the build log for
CHECK_ALL_WARNINGS
set to True.