Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit b2e5383

Browse files
committed
remove unnecessary patch
1 parent 64a8f38 commit b2e5383

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/tools/chroma_search_tool_test.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,21 @@ def mock_collection():
1919

2020
@pytest.fixture
2121
def chroma_tool(mock_collection):
22-
with patch('crewai_tools.tools.chroma_tool.chroma_search_tool.CHROMA_AVAILABLE', True):
23-
return ChromaSearchTool(collection=mock_collection)
22+
return ChromaSearchTool(collection=mock_collection)
2423

2524

2625
def test_tool_initialization(mock_collection):
27-
with patch('crewai_tools.tools.chroma_tool.chroma_search_tool.CHROMA_AVAILABLE', True):
28-
tool = ChromaSearchTool(collection=mock_collection, limit=5)
26+
tool = ChromaSearchTool(collection=mock_collection, limit=5)
2927

30-
assert tool.collection == mock_collection
31-
assert tool.limit == 5
32-
assert tool.name == "ChromaSearchTool"
28+
assert tool.collection == mock_collection
29+
assert tool.limit == 5
30+
assert tool.name == "ChromaSearchTool"
3331

3432

3533
def test_missing_collection():
3634
"""Test initialization fails without collection"""
37-
with patch('crewai_tools.tools.chroma_tool.chroma_search_tool.CHROMA_AVAILABLE', True):
38-
with pytest.raises(Exception):
39-
ChromaSearchTool()
35+
with pytest.raises(Exception):
36+
ChromaSearchTool()
4037

4138

4239
def test_successful_search(chroma_tool):

0 commit comments

Comments
 (0)