Skip to content

Commit

Permalink
fix(tests): update pytest fixture for client based on vllm-project#7565
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Mistele committed Sep 4, 2024
1 parent ca8c14b commit 4972a89
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/tool_use/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import pytest_asyncio
from huggingface_hub import snapshot_download

from tests.utils import RemoteOpenAIServer
Expand All @@ -25,6 +26,7 @@ def server(request, server_config: ServerConfig):
yield server


@pytest.fixture(scope="session")
def client(server: RemoteOpenAIServer):
return server.get_async_client()
@pytest_asyncio.fixture
async def client(server: RemoteOpenAIServer):
async with server.get_async_client() as async_client:
yield async_client

0 comments on commit 4972a89

Please sign in to comment.