Fix test file path handling for CSVKnowledgeSource

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-05-06 00:12:12 +00:00
parent 6e0f1fe38d
commit a98a44afb2

View File

@@ -33,7 +33,7 @@ def test_csv_knowledge_source_updates(mock_add, mock_search, tmpdir):
for row in initial_csv_content:
f.write(",".join(row) + "\n")
csv_source = CSVKnowledgeSource(file_paths=csv_path)
csv_source = CSVKnowledgeSource(file_paths=[csv_path])
original_files_have_changed = csv_source.files_have_changed
files_changed_called = [False]
@@ -65,7 +65,8 @@ def test_csv_knowledge_source_updates(mock_add, mock_search, tmpdir):
time.sleep(1)
with open(csv_path, "w") as f:
csv_path_str = str(csv_path)
with open(csv_path_str, "w") as f:
for row in updated_csv_content:
f.write(",".join(row) + "\n")