Skip to content

Skip tests which use network #9

@jayvdb

Description

@jayvdb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions