diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-02-09 17:46:59 +0000 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-03-05 14:30:51 +0000 |
commit | e91969a6bd63fb526ead83f97830bbc4bff139e3 (patch) | |
tree | 2ed863007e29fca295ecab927f4103cede8783f1 | |
parent | b426b2b9219d656357275318eb03a5b1f503887f (diff) | |
download | python-setuptools-git-e91969a6bd63fb526ead83f97830bbc4bff139e3.tar.gz |
Add a 'uses_network' marker to tests that require connectivity
-rw-r--r-- | conftest.py | 1 | ||||
-rw-r--r-- | setuptools/tests/config/test_apply_pyprojecttoml.py | 1 | ||||
-rw-r--r-- | setuptools/tests/integration/test_pip_install_sdist.py | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/conftest.py b/conftest.py index 43f33ba4..723e5b43 100644 --- a/conftest.py +++ b/conftest.py @@ -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 = [ diff --git a/setuptools/tests/config/test_apply_pyprojecttoml.py b/setuptools/tests/config/test_apply_pyprojecttoml.py index 7e9dafea..4d9c8c5f 100644 --- a/setuptools/tests/config/test_apply_pyprojecttoml.py +++ b/setuptools/tests/config/test_apply_pyprojecttoml.py @@ -23,6 +23,7 @@ DOWNLOAD_DIR = Path(__file__).parent / "downloads" @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) diff --git a/setuptools/tests/integration/test_pip_install_sdist.py b/setuptools/tests/integration/test_pip_install_sdist.py index 86cc4235..0177c22d 100644 --- a/setuptools/tests/integration/test_pip_install_sdist.py +++ b/setuptools/tests/integration/test_pip_install_sdist.py @@ -112,6 +112,7 @@ ALREADY_LOADED = ("pytest", "mypy") # loaded by pytest/pytest-enabler @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) |