Skip to content

Commit 7210aae

Browse files
committed
Re-add additional test skipping logic
1 parent e44c439 commit 7210aae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration/test_hybrid.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ def test_hybrid_query(index):
173173

174174
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
175175
def test_hybrid_query_with_filter(index):
176+
skip_if_redis_version_below(index.client, "8.4.0")
177+
176178
text = "a medical professional with expertise in lung cancer"
177179
text_field = "description"
178180
vector = [0.1, 0.1, 0.5]
@@ -199,6 +201,8 @@ def test_hybrid_query_with_filter(index):
199201

200202
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
201203
def test_hybrid_query_with_geo_filter(index):
204+
skip_if_redis_version_below(index.client, "8.4.0")
205+
202206
text = "a medical professional with expertise in lung cancer"
203207
text_field = "description"
204208
vector = [0.1, 0.1, 0.5]
@@ -225,6 +229,8 @@ def test_hybrid_query_with_geo_filter(index):
225229
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
226230
@pytest.mark.parametrize("alpha", [0.1, 0.5, 0.9])
227231
def test_hybrid_query_alpha(index, alpha):
232+
skip_if_redis_version_below(index.client, "8.4.0")
233+
228234
text = "a medical professional with expertise in lung cancer"
229235
text_field = "description"
230236
vector = [0.1, 0.1, 0.5]
@@ -255,6 +261,8 @@ def test_hybrid_query_alpha(index, alpha):
255261

256262
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
257263
def test_hybrid_query_stopwords(index):
264+
skip_if_redis_version_below(index.client, "8.4.0")
265+
258266
text = "a medical professional with expertise in lung cancer"
259267
text_field = "description"
260268
vector = [0.1, 0.1, 0.5]
@@ -291,6 +299,8 @@ def test_hybrid_query_stopwords(index):
291299

292300
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
293301
def test_hybrid_query_with_text_filter(index):
302+
skip_if_redis_version_below(index.client, "8.4.0")
303+
294304
text = "a medical professional with expertise in lung cancer"
295305
text_field = "description"
296306
vector = [0.1, 0.1, 0.5]
@@ -340,6 +350,8 @@ def test_hybrid_query_with_text_filter(index):
340350
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
341351
@pytest.mark.parametrize("scorer", ["BM25STD", "TFIDF", "TFIDF.DOCNORM"])
342352
def test_hybrid_query_word_weights(index, scorer):
353+
skip_if_redis_version_below(index.client, "8.4.0")
354+
343355
text = "a medical professional with expertise in lung cancers"
344356
text_field = "description"
345357
vector = [0.1, 0.1, 0.5]
@@ -402,6 +414,8 @@ def test_hybrid_query_word_weights(index, scorer):
402414
@pytest.mark.skipif(not REDIS_HYBRID_AVAILABLE, reason=SKIP_REASON)
403415
@pytest.mark.asyncio
404416
async def test_hybrid_query_async(async_index):
417+
await skip_if_redis_version_below_async(async_index.client, "8.4.0")
418+
405419
text = "a medical professional with expertise in lung cancer"
406420
text_field = "description"
407421
vector = [0.1, 0.1, 0.5]

0 commit comments

Comments
 (0)