diff --git a/tests/conftest.py b/tests/conftest.py index d3388dd0594..4cb8154fad2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -723,7 +723,7 @@ def factory() -> str: return factory -@pytest.fixture +@pytest.fixture(scope="session") def mock_server() -> Iterator[MockServer]: server = make_mock_server() test_server = MockServer(server) diff --git a/tests/unit/test_network_lazy_wheel.py b/tests/unit/test_network_lazy_wheel.py index 356387d2bba..1a6f6686e15 100644 --- a/tests/unit/test_network_lazy_wheel.py +++ b/tests/unit/test_network_lazy_wheel.py @@ -25,12 +25,12 @@ } -@pytest.fixture +@pytest.fixture(scope="session") def session() -> PipSession: return PipSession() -@pytest.fixture +@pytest.fixture(scope="session") def mypy_whl_no_range(mock_server: MockServer, shared_data: TestData) -> Iterator[str]: mypy_whl = shared_data.packages / "mypy-0.782-py3-none-any.whl" mock_server.set_responses([file_response(mypy_whl)])