Skip to content

Commit

Permalink
Add a 'uses_network' marker to tests that require connectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Feb 9, 2022
1 parent f0f5730 commit bfb2ff2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def pytest_addoption(parser):

def pytest_configure(config):
config.addinivalue_line("markers", "integration: integration tests")
config.addinivalue_line("markers", "uses_network: tests may try to download files")


collect_ignore = [
Expand Down
1 change: 1 addition & 0 deletions setuptools/tests/config/test_apply_pyprojecttoml.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

@pytest.mark.parametrize("url", EXAMPLE_URLS)
@pytest.mark.filterwarnings("ignore")
@pytest.mark.uses_network
def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path):
monkeypatch.setattr(expand, "read_attr", Mock(return_value="0.0.1"))
setupcfg_example = retrieve_file(url, DOWNLOAD_DIR)
Expand Down
1 change: 1 addition & 0 deletions setuptools/tests/integration/test_pip_install_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def _debug_info():


@pytest.mark.parametrize('package, version', EXAMPLES)
@pytest.mark.uses_network
def test_install_sdist(package, version, tmp_path, venv_python, setuptools_wheel):
venv_pip = (venv_python, "-m", "pip")
sdist = retrieve_sdist(package, version, tmp_path)
Expand Down

0 comments on commit bfb2ff2

Please sign in to comment.