mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +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(
|
def test_crew_external_memory_save_with_memory_flag(
|
||||||
mem_method, crew_with_external_memory
|
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(
|
with patch(
|
||||||
f"crewai.memory.external.external_memory.ExternalMemory.{mem_method}"
|
f"crewai.memory.external.external_memory.ExternalMemory.{mem_method}"
|
||||||
) as mock_method:
|
) as mock_method:
|
||||||
|
|||||||
Reference in New Issue
Block a user