mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
Fix CI failures: restore missing error classes and resolve type issues
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -3,6 +3,8 @@ import importlib
|
||||
import sys
|
||||
from unittest.mock import patch
|
||||
|
||||
from crewai.utilities.errors import ChromaDBRequiredError
|
||||
|
||||
|
||||
def test_import_without_chromadb():
|
||||
"""Test that crewai can be imported without chromadb."""
|
||||
@@ -31,7 +33,7 @@ def test_memory_storage_without_chromadb():
|
||||
|
||||
assert not HAS_CHROMADB
|
||||
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
with pytest.raises(ChromaDBRequiredError) as excinfo:
|
||||
storage = RAGStorage()
|
||||
storage._initialize_app()
|
||||
|
||||
@@ -48,7 +50,7 @@ def test_knowledge_storage_without_chromadb():
|
||||
|
||||
assert not HAS_CHROMADB
|
||||
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
with pytest.raises(ChromaDBRequiredError) as excinfo:
|
||||
storage = KnowledgeStorage()
|
||||
storage.initialize_knowledge_storage()
|
||||
|
||||
@@ -65,7 +67,7 @@ def test_embedding_configurator_without_chromadb():
|
||||
|
||||
assert not HAS_CHROMADB
|
||||
|
||||
with pytest.raises(ImportError) as excinfo:
|
||||
with pytest.raises(ChromaDBRequiredError) as excinfo:
|
||||
configurator = EmbeddingConfigurator()
|
||||
configurator.configure_embedder()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user