From 1572f3b6b944fc894dc30d4fe50d7cddeb7dd879 Mon Sep 17 00:00:00 2001 From: keenborder786 <21110290@lums.edu.pk> Date: Fri, 20 Dec 2024 21:04:14 +0500 Subject: [PATCH] [chore]: Annotation Added for Tests LLamaCpp --- libs/community/tests/unit_tests/embeddings/test_llamacpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/community/tests/unit_tests/embeddings/test_llamacpp.py b/libs/community/tests/unit_tests/embeddings/test_llamacpp.py index b2efdd024cf15..423079d1336ad 100644 --- a/libs/community/tests/unit_tests/embeddings/test_llamacpp.py +++ b/libs/community/tests/unit_tests/embeddings/test_llamacpp.py @@ -15,12 +15,12 @@ def mock_llama_client(): yield mock_client -def test_initialization(mock_llama_client): +def test_initialization(mock_llama_client: MagicMock) -> None: embeddings = LlamaCppEmbeddings(client=mock_llama_client) assert embeddings.client is not None -def test_embed_documents(mock_llama_client): +def test_embed_documents(mock_llama_client: MagicMock) -> None: mock_llama_client.create_embedding.return_value = { "data": [{"embedding": [[0.1, 0.2, 0.3]]}, {"embedding": [[0.4, 0.5, 0.6]]}] } @@ -31,7 +31,7 @@ def test_embed_documents(mock_llama_client): assert result == expected -def test_embed_query(mock_llama_client): +def test_embed_query(mock_llama_client: MagicMock) -> None: mock_llama_client.embed.return_value = [[0.1, 0.2, 0.3]] embeddings = LlamaCppEmbeddings(client=mock_llama_client) result = embeddings.embed_query("Sample query")