Skip to content

Commit a7e316c

Browse files
committed
fix: stabilize CI imports by mocking chromadb/langchain_chroma for pytest
1 parent 4523038 commit a7e316c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ def create_mock_module(name, **kwargs):
7676
sys.modules["litellm.types.utils"] = create_mock_module("litellm.types.utils")
7777
sys.modules["instructor"] = create_mock_module("instructor")
7878
sys.modules["crewai_tools"] = create_mock_module("crewai_tools")
79+
sys.modules["langchain_chroma"] = create_mock_module(
80+
"langchain_chroma", Chroma=MagicMock()
81+
)
82+
sys.modules["chromadb"] = create_mock_module(
83+
"chromadb", PersistentClient=MagicMock()
84+
)
7985

8086
# Mock aiohttp to avoid the ConnectionTimeoutError
8187
aiohttp_mock = create_mock_module("aiohttp")

0 commit comments

Comments
 (0)