Skip to content

Commit 5576569

Browse files
fixing unit test to be compatible with lance
1 parent 547384b commit 5576569

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/unit/test_parsers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ def test_txt_parser():
2929
# Check that content was extracted correctly
3030
assert content == [{"text": "This is sample text content for testing."}]
3131

32+
# Convert content to str
33+
text_content = "\n".join([item["text"] for item in content])
34+
3235
# Test saving content
3336
output_path = os.path.join(tempfile.gettempdir(), "output.txt")
34-
parser.save(content, output_path)
37+
parser.save(text_content, output_path)
3538

3639
# Check that the file was saved correctly
3740
with open(output_path) as f:
3841
saved_content = f.read()
3942

40-
assert saved_content == content
43+
assert saved_content == text_content
4144
finally:
4245
# Clean up
4346
if os.path.exists(file_path):

0 commit comments

Comments
 (0)