mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-15 02:58:30 +00:00
Fix lint issues: suppress unused chromadb import warnings and update remaining external memory test
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -170,7 +170,7 @@ def test_crew_external_memory_save_with_memory_flag(
|
||||
mem_method, crew_with_external_memory
|
||||
):
|
||||
try:
|
||||
import chromadb
|
||||
import chromadb # noqa: F401
|
||||
HAS_CHROMADB = True
|
||||
except ImportError:
|
||||
HAS_CHROMADB = False
|
||||
@@ -190,6 +190,15 @@ def test_crew_external_memory_save_with_memory_flag(
|
||||
def test_crew_external_memory_save_using_crew_without_memory_flag(
|
||||
mem_method, crew_with_external_memory_without_memory_flag
|
||||
):
|
||||
try:
|
||||
import chromadb # noqa: F401
|
||||
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