Skip to content

Commit d957be2

Browse files
committed
x
1 parent 49377c2 commit d957be2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/unit_tests/v2/test_pg_vectorstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async def engine_sync(self) -> AsyncIterator[PGEngine]:
9090
await aexecute(engine_sync, f'DROP TABLE IF EXISTS "{DEFAULT_TABLE_SYNC}"')
9191
await engine_sync.close()
9292

93-
@pytest_asyncio.fixture(scope="class")
93+
@pytest_asyncio.fixture(scope="class") # type: ignore
9494
def vs_sync(self, engine_sync: PGEngine) -> Iterator[PGVectorStore]:
9595
engine_sync.init_vectorstore_table(DEFAULT_TABLE_SYNC, VECTOR_SIZE)
9696

tests/unit_tests/v2/test_pg_vectorstore_standard_suite.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22
import uuid
3-
from typing import AsyncIterator
3+
from typing import AsyncGenerator, AsyncIterator
44

55
import pytest
66
import pytest_asyncio
@@ -39,7 +39,7 @@ async def run(engine: PGEngine, query: str) -> None:
3939
@pytest.mark.asyncio
4040
class 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
6867
class 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

Comments
 (0)