mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-11 00:58:30 +00:00
Fix import error handling for optional chromadb dependency
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -12,7 +12,6 @@ class TestOptionalChromadb(unittest.TestCase):
|
||||
with patch.dict(sys.modules, {"chromadb": None}):
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
from crewai.memory.storage.rag_storage import RAGStorage
|
||||
storage = RAGStorage(type="test")
|
||||
|
||||
assert "ChromaDB is not installed" in str(excinfo.value)
|
||||
|
||||
@@ -21,6 +20,5 @@ class TestOptionalChromadb(unittest.TestCase):
|
||||
with patch.dict(sys.modules, {"chromadb": None}):
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
from crewai.knowledge.storage.knowledge_storage import KnowledgeStorage
|
||||
storage = KnowledgeStorage()
|
||||
|
||||
assert "ChromaDB is not installed" in str(excinfo.value)
|
||||
|
||||
Reference in New Issue
Block a user