Skip to content

Commit 284b983

Browse files
fix(valkey): skip async mixin tests gracefully on older haystack versions
Use pytest.importorskip so the test file is skipped instead of failing with ImportError when running with haystack < 2.27.0 (lowest-direct-deps step). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5ce61c2 commit 284b983

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

integrations/valkey/tests/test_document_store_async.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
import pytest
1010
import pytest_asyncio
1111
from haystack.dataclasses import ByteStream, Document
12-
from haystack.testing.document_store import (
12+
13+
pytest.importorskip("haystack.testing.document_store_async", reason="Requires haystack with async mixin test classes")
14+
15+
from haystack.testing.document_store import ( # noqa: E402
1316
CountDocumentsByFilterAsyncTest,
1417
CountUniqueMetadataByFilterAsyncTest,
1518
UpdateByFilterAsyncTest,

0 commit comments

Comments
 (0)