There was an error while loading. Please reload this page.
1 parent 547384b commit 5576569Copy full SHA for 5576569
1 file changed
tests/unit/test_parsers.py
@@ -29,15 +29,18 @@ def test_txt_parser():
29
# Check that content was extracted correctly
30
assert content == [{"text": "This is sample text content for testing."}]
31
32
+ # Convert content to str
33
+ text_content = "\n".join([item["text"] for item in content])
34
+
35
# Test saving content
36
output_path = os.path.join(tempfile.gettempdir(), "output.txt")
- parser.save(content, output_path)
37
+ parser.save(text_content, output_path)
38
39
# Check that the file was saved correctly
40
with open(output_path) as f:
41
saved_content = f.read()
42
- assert saved_content == content
43
+ assert saved_content == text_content
44
finally:
45
# Clean up
46
if os.path.exists(file_path):
0 commit comments