Skip to content

Commit

Permalink
scope mock server fixture to session scope
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Aug 11, 2024
1 parent e4b2aaf commit b06d73b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_network_lazy_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
Expand Down

0 comments on commit b06d73b

Please sign in to comment.