hack fix unit

This commit is contained in:
Mason Daugherty 2025-08-05 21:07:18 -04:00
parent 20a41ec5df
commit ffda528f36
No known key found for this signature in database

View File

@ -2,7 +2,7 @@
import json import json
import logging import logging
from collections.abc import AsyncIterator, Iterator from collections.abc import AsyncIterator, Generator, Iterator
from typing import Any from typing import Any
from unittest.mock import MagicMock, patch from unittest.mock import MagicMock, patch
@ -242,8 +242,9 @@ class TestChatOllama(ChatModelV1UnitTests):
""" """
return False return False
# TODO: investigate type ignore, this feels hacky
@pytest.fixture @pytest.fixture
def model(self) -> Iterator[ChatOllama]: def model(self) -> Generator[ChatOllama, None, None]: # type: ignore[override]
"""Create a ChatOllama instance for testing.""" """Create a ChatOllama instance for testing."""
sync_patcher = patch("langchain_ollama.chat_models_v1.Client") sync_patcher = patch("langchain_ollama.chat_models_v1.Client")
async_patcher = patch("langchain_ollama.chat_models_v1.AsyncClient") async_patcher = patch("langchain_ollama.chat_models_v1.AsyncClient")