From c08c066dfbde2323f616f5d35d9f8fdc0ed1ac14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 09:52:53 +0200 Subject: [PATCH 1/5] Tests: test_prompt_for_keyring_if_needed requires network It pip installs keyring --- tests/functional/test_install_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py index b8fa56bffc9..7ca9eb2469e 100644 --- a/tests/functional/test_install_config.py +++ b/tests/functional/test_install_config.py @@ -417,6 +417,7 @@ def flags( return flags +@pytest.mark.network def test_prompt_for_keyring_if_needed( data: TestData, cert_factory: CertFactory, From 52f6e96b1ff26b468c08b55af9549700173708c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 10:04:33 +0200 Subject: [PATCH 2/5] Tests: test_double_install_fail requires network It pip installs pip. --- tests/functional/test_install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index 1dc46cf8621..1ff95b2dfc4 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -1917,6 +1917,7 @@ def test_double_install(script: PipTestEnvironment) -> None: assert msg not in result.stderr +@pytest.mark.network def test_double_install_fail( script: PipTestEnvironment, resolver_variant: ResolverVariant ) -> None: From 092712fa2a057f9ba142add61a5f1448b4d523ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 10:30:19 +0200 Subject: [PATCH 3/5] Tests: test_install_sdist_links requires network It runs pip in subprocess to install build dependencies from internet. --- tests/functional/test_install.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index 1ff95b2dfc4..e97f2fae8cb 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -2677,6 +2677,7 @@ def test_install_pip_prints_req_chain_pypi(script: PipTestEnvironment) -> None: ) +@pytest.mark.network @pytest.mark.parametrize("common_prefix", ["", "linktest-1.0/"]) def test_install_sdist_links(script: PipTestEnvironment, common_prefix: str) -> None: """ From c672e9c0f134eceef893c813c625a76c9ba8e2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 10:40:27 +0200 Subject: [PATCH 4/5] Tests: test_lock_vcs and test_lock_archive require network They git clone stuff from https://github.com/pypa/pip-test-package/ --- tests/functional/test_lock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/test_lock.py b/tests/functional/test_lock.py index b99850526e1..709ce54cff7 100644 --- a/tests/functional/test_lock.py +++ b/tests/functional/test_lock.py @@ -181,6 +181,7 @@ def test_lock_local_editable_with_dep( ] +@pytest.mark.network def test_lock_vcs(script: PipTestEnvironment, shared_data: TestData) -> None: result = script.pip( "lock", @@ -205,6 +206,7 @@ def test_lock_vcs(script: PipTestEnvironment, shared_data: TestData) -> None: ] +@pytest.mark.network def test_lock_archive(script: PipTestEnvironment, shared_data: TestData) -> None: result = script.pip( "lock", From 95a4efe01ee1816df19467bc9258e74c3608524c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 6 May 2025 10:51:50 +0200 Subject: [PATCH 5/5] Tests: test_backend_sees_config_via_sdist requires network E RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this): E Caused by line: "WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/foo/" E Complete stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/foo/ E WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/foo/ E WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/foo/ E WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/foo/ E WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/foo/ --- tests/functional/test_config_settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/test_config_settings.py b/tests/functional/test_config_settings.py index 4e0b12ca185..9f8f8d4bde7 100644 --- a/tests/functional/test_config_settings.py +++ b/tests/functional/test_config_settings.py @@ -179,6 +179,7 @@ def test_backend_sees_config_via_constraint(script: PipTestEnvironment) -> None: assert json.loads(output) == {"FOO": "Hello"} +@pytest.mark.network def test_backend_sees_config_via_sdist(script: PipTestEnvironment) -> None: name, version, project_dir = make_project(script.scratch_path) dists_dir = script.scratch_path / "dists"