Skip to content

Commit a4c25ca

Browse files
update skip logic for new query tests
1 parent 43938c0 commit a4c25ca

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tests/integration/test_query.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,12 @@ def test_vector_query_with_ef_runtime_flat_index(flat_index, vector_query, sampl
926926

927927

928928
@pytest.fixture
929-
def missing_fields_index(worker_id, redis_url):
929+
def missing_fields_index(worker_id, redis_client):
930930
"""Create an index with INDEXMISSING and INDEXEMPTY enabled fields and test data."""
931+
skip_if_redis_version_below(
932+
redis_client,
933+
"7.2.0",
934+
)
931935

932936
# Create an index with INDEXMISSING enabled fields (filterable fields only)
933937
missing_index = SearchIndex.from_dict(
@@ -958,19 +962,12 @@ def missing_fields_index(worker_id, redis_url):
958962
{"name": "description", "type": "text"},
959963
],
960964
},
961-
redis_url=redis_url,
965+
redis_client=redis_client,
962966
)
963967

964968
# Create the index
965969
missing_index.create(overwrite=True)
966970

967-
# Skip all missing field tests if Redis version doesn't support INDEXMISSING/INDEXEMPTY (requires Redis 7.4+)
968-
skip_if_redis_version_below(
969-
missing_index.client,
970-
"7.4.0",
971-
"INDEXMISSING/INDEXEMPTY features require Redis 7.4+ (RediSearch 2.10+)",
972-
)
973-
974971
# Load test data with different missing field scenarios
975972
test_data = [
976973
{

0 commit comments

Comments
 (0)