Skip to content

Commit 6b558ec

Browse files
reranker testing
1 parent 18110ed commit 6b558ec

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

tests/integration/test_rerankers.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ def reranker(request, skip_reranker):
3333
return request.param(model="rerank-lite-1")
3434

3535

36-
@pytest.fixture
37-
def cohereReranker():
38-
return CohereReranker()
39-
40-
4136
@pytest.fixture
4237
def hfCrossEncoderReranker():
4338
return HFCrossEncoderReranker()
@@ -74,15 +69,15 @@ async def test_async_rank_documents(reranker):
7469

7570

7671
# Test handling of bad input
77-
def test_bad_input_cohere(cohereReranker):
72+
def test_bad_input(reranker):
7873
with pytest.raises(Exception):
79-
cohereReranker.rank("", []) # Empty query or documents
74+
reranker.rank("", []) # Empty query or documents
8075

8176
with pytest.raises(Exception):
82-
cohereReranker.rank(123, ["valid document"]) # Invalid type for query
77+
reranker.rank(123, ["valid document"]) # Invalid type for query
8378

8479
with pytest.raises(Exception):
85-
cohereReranker.rank("valid query", "not a list") # Invalid type for documents
80+
reranker.rank("valid query", "not a list") # Invalid type for documents
8681

8782
with pytest.raises(Exception):
8883
reranker.rank(

0 commit comments

Comments
 (0)