mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-16 08:06:14 +00:00
hack fix unit
This commit is contained in:
parent
20a41ec5df
commit
ffda528f36
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user