mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
Fix test file path handling for CSVKnowledgeSource
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user