diff --git a/pyproject.toml b/pyproject.toml index e6cc523e9..4236a4a11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,6 +119,7 @@ markers = [ "fortran: Fortran code", "integration: Full package build", "isolated: Needs an isolated virtualenv", + "network: Needs a network connection to setup or run", "setuptools: Tests setuptools integration", "virtualenv: Needs a virtualenv", ] diff --git a/tests/conftest.py b/tests/conftest.py index 48d7852d1..0fd0855e7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -297,6 +297,7 @@ def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: if "isolated" in getattr(item, "fixturenames", ()): item.add_marker(pytest.mark.virtualenv) item.add_marker(pytest.mark.isolated) + item.add_marker(pytest.mark.network) def pytest_report_header() -> str: diff --git a/tests/test_fortran.py b/tests/test_fortran.py index aee888256..598b0ce07 100644 --- a/tests/test_fortran.py +++ b/tests/test_fortran.py @@ -27,6 +27,7 @@ @pytest.mark.compile() @pytest.mark.configure() @pytest.mark.fortran() +@pytest.mark.network() @pytest.mark.skipif(shutil.which("gfortran") is None, reason="gfortran not available") @pytest.mark.skipif( sysconfig.get_platform().startswith("win"), diff --git a/tests/test_pyproject_pep518.py b/tests/test_pyproject_pep518.py index a3a4a5300..a46a98c82 100644 --- a/tests/test_pyproject_pep518.py +++ b/tests/test_pyproject_pep518.py @@ -10,7 +10,7 @@ import pytest -@pytest.mark.isolated() +@pytest.mark.network() @pytest.mark.integration() def test_pep518_sdist(package_simple_pyproject_ext): correct_metadata = textwrap.dedent(