From 6486ec870ba8d680362a9c49a172cf0a0323b2e4 Mon Sep 17 00:00:00 2001 From: ayush chaurasia Date: Fri, 23 Feb 2024 03:02:05 +0530 Subject: [PATCH] update --- python/tests/test_rerankers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/tests/test_rerankers.py b/python/tests/test_rerankers.py index aabba994..f4b0fb05 100644 --- a/python/tests/test_rerankers.py +++ b/python/tests/test_rerankers.py @@ -129,6 +129,14 @@ def test_linear_combination(tmp_path): table.search(vector=query_vector, text=query, query_type="vector").rerank( normalize="score" ) + + # raise an error if only vector or text is provided + with pytest.raises(ValueError): + table.search(vector=query_vector).to_arrow() + + with pytest.raises(ValueError): + table.search(text=query).to_arrow() + @pytest.mark.skipif(