-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Document/standardize how to skip network tests #16750
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
Comments
From what you explain, I like option 2. |
Yes, me too. The only limitation of option 2 is deselects the tests instead of skipping it (i.e. by default it will just not show it in the log). And it doesn't seem like it's possible to show deselected tests with the |
Having #16652 merged, now the |
It works, but not if
|
euh... sorry not sure to understand..
almost a copy of the CI (except the coverage thing and the number of test) and the network dependent test is skipped. It wasn't working before because the pytest marker was undeclared. |
The workflow I mean is more,
The important part is the Again it's not really a big issue, but just something to keep in mind. |
Understood, thanks for the clarification. |
@rth, sorry, me again... |
We could put it in |
I'm leaving it as is, then. Thanks for your answer. |
Following discussion in #16743 I think it would be good to document and standardize how we skip tests that require network or download (this could also apply to tests that are skipped for other reason). Currently there are these mechanisms,
SKLEARN_SKIP_NETWORK_TESTS
for some testsnetwork
pytest marker for other tests, meaning that such tests can be deselected with-m "not network"
pytest option--skip-network
pytest option, that skips tests with thenetwork
marker. The issue with this is that it requires aconftests.py
, which is currently not available e.g. when scikit-learn is installed and tests are run withpytest --pyargs sklearn
.I would propose to remove 1, and standardize/document the use of either 2 or 3. If we go with 3 we might need to move
conftests.py
under thesklearn
folder, although it's also not ideal.The text was updated successfully, but these errors were encountered: