Skip to content

Commit b06d73b

Browse files
scope mock server fixture to session scope
1 parent e4b2aaf commit b06d73b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ def factory() -> str:
723723
return factory
724724

725725

726-
@pytest.fixture
726+
@pytest.fixture(scope="session")
727727
def mock_server() -> Iterator[MockServer]:
728728
server = make_mock_server()
729729
test_server = MockServer(server)

tests/unit/test_network_lazy_wheel.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
}
2626

2727

28-
@pytest.fixture
28+
@pytest.fixture(scope="session")
2929
def session() -> PipSession:
3030
return PipSession()
3131

3232

33-
@pytest.fixture
33+
@pytest.fixture(scope="session")
3434
def mypy_whl_no_range(mock_server: MockServer, shared_data: TestData) -> Iterator[str]:
3535
mypy_whl = shared_data.packages / "mypy-0.782-py3-none-any.whl"
3636
mock_server.set_responses([file_response(mypy_whl)])

0 commit comments

Comments
 (0)