From ffda528f367ee572ee3fe5acd33c66cb18d7d844 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Tue, 5 Aug 2025 21:07:18 -0400 Subject: [PATCH] hack fix unit --- libs/partners/ollama/tests/unit_tests/test_chat_models_v1.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/partners/ollama/tests/unit_tests/test_chat_models_v1.py b/libs/partners/ollama/tests/unit_tests/test_chat_models_v1.py index 493e1c996de..5788bf54b61 100644 --- a/libs/partners/ollama/tests/unit_tests/test_chat_models_v1.py +++ b/libs/partners/ollama/tests/unit_tests/test_chat_models_v1.py @@ -2,7 +2,7 @@ import json import logging -from collections.abc import AsyncIterator, Iterator +from collections.abc import AsyncIterator, Generator, Iterator from typing import Any from unittest.mock import MagicMock, patch @@ -242,8 +242,9 @@ class TestChatOllama(ChatModelV1UnitTests): """ return False + # TODO: investigate type ignore, this feels hacky @pytest.fixture - def model(self) -> Iterator[ChatOllama]: + def model(self) -> Generator[ChatOllama, None, None]: # type: ignore[override] """Create a ChatOllama instance for testing.""" sync_patcher = patch("langchain_ollama.chat_models_v1.Client") async_patcher = patch("langchain_ollama.chat_models_v1.AsyncClient")