Skip to content

Commit

Permalink
Remove unnecessary skips
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanrfrazier committed Apr 22, 2024
1 parent 40c2c96 commit f5d4b8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion libs/astradb/langchain_astradb/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def embeddings(self) -> Optional[Embeddings]:

def _using_vectorize(self) -> bool:
"""Indicates whether server-side embeddings are being used."""
return self._using_vectorize()
return self.collection_vector_service_options is not None

def _select_relevance_score_fn(self) -> Callable[[float], float]:
"""
Expand Down
16 changes: 3 additions & 13 deletions libs/astradb/tests/integration_tests/test_vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ def _has_env_vars() -> bool:


@pytest.fixture(scope="session")
@pytest.mark.skipif(
is_vector_service_available(), reason="only run vectorize-specific tests in dev"
)
def astradb_credentials() -> Iterable[AstraDBCredentials]:
yield {
"token": os.environ["ASTRA_DB_APPLICATION_TOKEN"],
Expand All @@ -135,9 +132,6 @@ def astradb_credentials() -> Iterable[AstraDBCredentials]:


@pytest.fixture(scope="function")
@pytest.mark.skipif(
is_vector_service_available(), reason="only run vectorize-specific tests in dev"
)
def store_someemb(
astradb_credentials: AstraDBCredentials,
) -> Iterable[AstraDBVectorStore]:
Expand All @@ -158,9 +152,6 @@ def store_someemb(


@pytest.fixture(scope="function")
@pytest.mark.skipif(
is_vector_service_available(), reason="only run vectorize-specific tests in dev"
)
def store_parseremb(
astradb_credentials: AstraDBCredentials,
) -> Iterable[AstraDBVectorStore]:
Expand Down Expand Up @@ -538,8 +529,7 @@ async def test_astradb_vectorstore_from_x_async(
else:
await v_store_4.aclear()

# @pytest.mark.parametrize("vector_store", ["store_someemb", "vectorize_store"])
@pytest.mark.parametrize("vector_store", ["vectorize_store"])
@pytest.mark.parametrize("vector_store", ["store_someemb", "vectorize_store"])
def test_astradb_vectorstore_crud(
self, vector_store: str, request: pytest.FixtureRequest
) -> None:
Expand Down Expand Up @@ -739,7 +729,7 @@ def test_astradb_vectorstore_metadata(
self, vector_store: str, request: pytest.FixtureRequest
) -> None:
"""Metadata filtering."""
vstore = request.getfixturevalue(vector_store)
vstore: AstraDBVectorStore = request.getfixturevalue(vector_store)
vstore.add_documents(
[
Document(
Expand Down Expand Up @@ -847,7 +837,7 @@ def test_astradb_vectorstore_massive_delete(
self, vector_store: str, request: pytest.FixtureRequest
) -> None:
"""Larger-scale bulk deletes."""
vstore = request.getfixturevalue(vector_store)
vstore: AstraDBVectorStore = request.getfixturevalue(vector_store)
M = 50
texts = [str(i + 1 / 7.0) for i in range(2 * M)]
ids0 = ["doc_%i" % i for i in range(M)]
Expand Down

0 comments on commit f5d4b8e

Please sign in to comment.