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

@@ -42,7 +42,6 @@ omit = ["tests/*"]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
"asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"

View File

@@ -44,7 +44,6 @@ def test_embed_query(embd_client: PineconeEmbeddings) -> None:
assert len(out) == DIMENSION
@pytest.mark.asyncio
async def test_aembed_query(embd_client: PineconeEmbeddings) -> None:
out = await embd_client.aembed_query("Hello, world!")
assert isinstance(out, list)
@@ -58,7 +57,6 @@ def test_embed_documents(embd_client: PineconeEmbeddings) -> None:
assert len(out[0]) == DIMENSION
@pytest.mark.asyncio
async def test_aembed_documents(embd_client: PineconeEmbeddings) -> None:
out = await embd_client.aembed_documents(["Hello, world!", "This is a test."])
assert isinstance(out, list)