11import os
22import uuid
3- from typing import AsyncIterator
3+ from typing import AsyncGenerator , AsyncIterator
44
55import pytest
66import pytest_asyncio
@@ -39,7 +39,7 @@ async def run(engine: PGEngine, query: str) -> None:
3939@pytest .mark .asyncio
4040class TestStandardSuiteSync (VectorStoreIntegrationTests ):
4141 @pytest_asyncio .fixture (scope = "function" )
42- async def sync_engine (self ) -> AsyncIterator [PGEngine ]:
42+ async def sync_engine (self ) -> AsyncGenerator [PGEngine , None ]:
4343 sync_engine = PGEngine .from_connection_string (url = CONNECTION_STRING )
4444 yield sync_engine
4545 await aexecute (sync_engine , f'DROP TABLE IF EXISTS "{ DEFAULT_TABLE_SYNC } "' )
@@ -63,7 +63,6 @@ def vectorstore(self, sync_engine: PGEngine) -> PGVectorStore: # type: ignore
6363
6464
6565@pytest .mark .enable_socket
66- # @pytest.mark.filterwarnings("ignore")
6766@pytest .mark .asyncio
6867class TestStandardSuiteAsync (VectorStoreIntegrationTests ):
6968 @pytest_asyncio .fixture (scope = "function" )
@@ -74,7 +73,9 @@ async def async_engine(self) -> AsyncIterator[PGEngine]:
7473 await async_engine .close ()
7574
7675 @pytest_asyncio .fixture (scope = "function" )
77- async def vectorstore (self , async_engine : PGEngine ) -> AsyncIterator [PGVectorStore ]:
76+ async def vectorstore ( # type: ignore[override]
77+ self , async_engine : PGEngine
78+ ) -> AsyncGenerator [PGVectorStore , None ]: # type: ignore
7879 """Get an empty vectorstore for unit tests."""
7980 await async_engine .ainit_vectorstore_table (
8081 DEFAULT_TABLE ,
0 commit comments