-
Notifications
You must be signed in to change notification settings - Fork 10
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
Skip tests which use network #9
Comments
Turns out it would be useless for pipenv, as all the network voodoo is happening in subprocesses, but I regularly encounter less complicated ones where this would be useful. |
I raised kevin1024/vcrpy#425 to see if they are interested in catching this. |
I'd imagine skipping instead of failing would be relatively straightforward, but the plugin does some kind of wonky stuff to get the output it does. My guess is there's a skips equivalent here. I don't think I'll have time to look into it myself, but feel free to send a PR. |
Currently this plugin, and all I've found like it, fail when the network is accessed.
It would be nice to have an option to instead skip the test.
The use case is RPM packaging, where the tests are run in an offline VM, and any tests which use the network are going to fail due to connection failures. Sometimes the cause of the error is not obvious.
Enter nose-detecthttp or similar and at least the cause of the error is clear.
The usual procedure is to then disable all of those tests, either with a patch (e.g. adding
@pytest.mark.rpmfail
to each of them).If they automatically skipped, the tests can be run without customisation, except for runner flags to enable nose-detecthttp and this new mode.
Current example is pipenv , https://github.com/pypa/pipenv , which I am packaging at https://build.opensuse.org/package/show/home:jayvdb:coala:python3-bears/python-pipenv , and it provides a fake pypi server as a fixture, but some of the tests seem to be slipping through to the real pypi server, but verifying this would require adding a patch to enable HTTPConnection debug logging.
The text was updated successfully, but these errors were encountered: