multiple: rely on asyncio_mode auto in tests (#27200)

This commit is contained in:
Erick Friis
2024-10-15 09:26:38 -07:00
committed by GitHub
parent 0a3e089827
commit 92ae61bcc8
32 changed files with 78 additions and 91 deletions

View File

@@ -68,7 +68,6 @@ def test_upstash_simple_insert() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_simple_insert_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -94,7 +93,6 @@ def test_upstash_with_metadatas() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_with_metadatas_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -125,7 +123,6 @@ def test_upstash_with_metadatas_with_scores() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_with_metadatas_with_scores_async() -> None:
"""Test end to end construction and scored search."""
texts = ["foo", "bar", "baz"]
@@ -159,7 +156,6 @@ def test_upstash_with_metadatas_with_scores_using_vector() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_with_metadatas_with_scores_using_vector_async() -> None:
"""Test end to end construction and scored search, using embedding vector."""
texts = ["foo", "bar", "baz"]
@@ -190,7 +186,6 @@ def test_upstash_mmr() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_mmr_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -213,7 +208,6 @@ def test_upstash_mmr_by_vector() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_mmr_by_vector_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -237,7 +231,6 @@ def test_init_from_index() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_init_from_async_index() -> None:
from upstash_vector import AsyncIndex
@@ -259,7 +252,6 @@ def test_init_from_credentials() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_init_from_credentials_async() -> None:
store = UpstashVectorStore(
index_url=os.environ["UPSTASH_VECTOR_REST_URL"],
@@ -326,7 +318,6 @@ def test_upstash_similarity_search_with_metadata() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_similarity_search_with_metadata_async() -> None:
store = UpstashVectorStore(embedding=FakeEmbeddings())
docs = [
@@ -384,7 +375,6 @@ def test_upstash_similarity_search_by_vector_with_metadata() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_similarity_search_by_vector_with_metadata_async() -> None:
store = UpstashVectorStore(embedding=FakeEmbeddings())
docs = [
@@ -434,7 +424,6 @@ def test_upstash_max_marginal_relevance_search_with_metadata() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_upstash_max_marginal_relevance_search_with_metadata_async() -> None:
store = UpstashVectorStore(embedding=FakeEmbeddings())
docs = [
@@ -539,7 +528,6 @@ def test_embedding_index() -> None:
@pytest.mark.vcr()
@pytest.mark.asyncio
async def test_embedding_index_async() -> None:
store = UpstashVectorStore(
index_url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"],