From 1b3fc68a87932c17e8f24139b8171a4c17fc6ceb Mon Sep 17 00:00:00 2001 From: sabaimran Date: Fri, 15 Mar 2024 11:01:48 +0530 Subject: [PATCH] Fix unit test for adding the filename to the compiled markdown entry --- tests/test_markdown_to_entries.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_markdown_to_entries.py b/tests/test_markdown_to_entries.py index 4a4a75f3..12ea238e 100644 --- a/tests/test_markdown_to_entries.py +++ b/tests/test_markdown_to_entries.py @@ -34,7 +34,9 @@ def test_markdown_file_with_no_headings_to_jsonl(tmp_path): # Ensure raw entry with no headings do not get heading prefix prepended assert not jsonl_data[0]["raw"].startswith("#") # Ensure compiled entry has filename prepended as top level heading - assert jsonl_data[0]["compiled"].startswith(expected_heading) + assert expected_heading in jsonl_data[0]["compiled"] + # Ensure compiled entry also includes the file name + assert str(tmp_path) in jsonl_data[0]["compiled"] def test_single_markdown_entry_to_jsonl(tmp_path):