mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-13 01:58:30 +00:00
Update external memory tests to handle optional ChromaDB dependency
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -169,6 +169,15 @@ def test_crew_external_memory_reset(mem_type, crew_with_external_memory):
|
||||
def test_crew_external_memory_save_with_memory_flag(
|
||||
mem_method, crew_with_external_memory
|
||||
):
|
||||
try:
|
||||
import chromadb
|
||||
HAS_CHROMADB = True
|
||||
except ImportError:
|
||||
HAS_CHROMADB = False
|
||||
|
||||
if not HAS_CHROMADB:
|
||||
pytest.skip("ChromaDB is required for this test")
|
||||
|
||||
with patch(
|
||||
f"crewai.memory.external.external_memory.ExternalMemory.{mem_method}"
|
||||
) as mock_method:
|
||||
|
||||
Reference in New Issue
Block a user