[MRG] Define custom markers for pytest.#16652
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 |
NicolasHug
left a comment
There was a problem hiding this comment.
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? |
Reference Issues/PRs
Fix part of #16651:
PytestUnknownMarkWarningintest_gradient_boosting.pyWhat 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_WARNINGSset to True.