Skip to content

Commit eab4316

Browse files
committed
fix tests
1 parent cd80093 commit eab4316

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

src/langchain_google_alloydb_pg/vectorstore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
from langchain_core.documents import Document
2121
from langchain_core.embeddings import Embeddings
2222
from langchain_core.vectorstores import VectorStore
23-
24-
from .async_vectorstore import AsyncAlloyDBVectorStore
25-
from .engine import AlloyDBEngine
2623
from langchain_postgres.v2.indexes import (
2724
DEFAULT_DISTANCE_STRATEGY,
2825
BaseIndex,
2926
DistanceStrategy,
3027
QueryOptions,
3128
)
3229

30+
from .async_vectorstore import AsyncAlloyDBVectorStore
31+
from .engine import AlloyDBEngine
32+
3333

3434
class AlloyDBVectorStore(VectorStore):
3535
"""Google AlloyDB Vector Store class"""

tests/test_async_vectorstore_index.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
import pytest_asyncio
2222
from langchain_core.documents import Document
2323
from langchain_core.embeddings import DeterministicFakeEmbedding
24-
from sqlalchemy import text
25-
26-
from langchain_google_alloydb_pg import AlloyDBEngine
27-
from langchain_google_alloydb_pg.async_vectorstore import AsyncAlloyDBVectorStore
28-
from langchain_google_alloydb_pg.indexes import (
24+
from langchain_postgres.v2.indexes import (
2925
DEFAULT_INDEX_NAME_SUFFIX,
3026
DistanceStrategy,
3127
HNSWIndex,
3228
IVFFlatIndex,
3329
)
30+
from sqlalchemy import text
31+
32+
from langchain_google_alloydb_pg import AlloyDBEngine
33+
from langchain_google_alloydb_pg.async_vectorstore import AsyncAlloyDBVectorStore
3434

3535
DEFAULT_TABLE = "test_table" + str(uuid.uuid4()).replace("-", "_")
3636
DEFAULT_INDEX_NAME = DEFAULT_TABLE + DEFAULT_INDEX_NAME_SUFFIX

tests/test_async_vectorstore_search.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
import pytest_asyncio
2020
from langchain_core.documents import Document
2121
from langchain_core.embeddings import DeterministicFakeEmbedding
22+
from langchain_postgres.v2.indexes import (
23+
DistanceStrategy,
24+
HNSWQueryOptions,
25+
)
2226
from metadata_filtering_data import FILTERING_TEST_CASES, METADATAS
2327
from PIL import Image
2428
from sqlalchemy import text
2529

2630
from langchain_google_alloydb_pg import AlloyDBEngine, Column
2731
from langchain_google_alloydb_pg.async_vectorstore import AsyncAlloyDBVectorStore
2832
from langchain_google_alloydb_pg.indexes import (
29-
DistanceStrategy,
30-
HNSWQueryOptions,
3133
ScaNNQueryOptions,
3234
)
3335

tests/test_vectorstore_index.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
import sqlalchemy
2323
from langchain_core.documents import Document
2424
from langchain_core.embeddings import DeterministicFakeEmbedding
25-
from sqlalchemy import text
26-
27-
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
28-
from langchain_google_alloydb_pg.indexes import (
25+
from langchain_postgres.v2.indexes import (
2926
DEFAULT_INDEX_NAME_SUFFIX,
3027
DistanceStrategy,
3128
HNSWIndex,
3229
IVFFlatIndex,
30+
)
31+
from sqlalchemy import text
32+
33+
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
34+
from langchain_google_alloydb_pg.indexes import (
3335
IVFIndex,
3436
ScaNNIndex,
3537
)

0 commit comments

Comments
 (0)