From 9710f03327c685194b7a63c2271a84697425cb47 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 10 Feb 2026 15:19:10 +0100 Subject: [PATCH] Downstream-Only: Remove pytest-subket from tests --- tests/conftest.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1b65e9d..8e1b595 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -447,18 +447,6 @@ def coverage_install( return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage") -@pytest.fixture(scope="session") -def socket_install(tmpdir_factory: pytest.TempPathFactory, common_wheels: Path) -> Path: - lib_dir = _common_wheel_editable_install( - tmpdir_factory, common_wheels, "pytest_subket" - ) - # pytest-subket is only included so it can intercept and block unexpected - # network requests. It should NOT be visible to the pip under test. - dist_info = next(lib_dir.glob("*.dist-info")) - shutil.rmtree(dist_info) - return lib_dir - - def install_pth_link( venv: VirtualEnvironment, project_name: str, lib_dir: Path ) -> None: @@ -475,7 +463,6 @@ def virtualenv_template( pip_editable_parts: tuple[Path, ...], setuptools_install: Path, coverage_install: Path, - socket_install: Path, ) -> VirtualEnvironment: venv_type: VirtualEnvironmentType if request.config.getoption("--use-venv"): @@ -489,10 +476,6 @@ def virtualenv_template( # Install setuptools, pytest-subket, and pip. install_pth_link(venv, "setuptools", setuptools_install) - install_pth_link(venv, "pytest_subket", socket_install) - # Also copy pytest-subket's .pth file so it can intercept socket calls. - with open(venv.site / "pytest_socket.pth", "w") as f: - f.write(socket_install.joinpath("pytest_socket.pth").read_text()) pth, dist_info = pip_editable_parts -- 2.52.0