We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8aae7f commit 8209a17Copy full SHA for 8209a17
tests/test_fix_date.py
@@ -1,8 +1,13 @@
1
import os
2
+import sys
3
import tempfile
4
import frontmatter
5
import pytest
6
7
+
8
+# Add the project root to sys.path
9
+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
10
11
import fix_date
12
13
@@ -12,7 +17,8 @@ def test_extract_date_from_filename():
17
18
14
19
def create_markdown_file(path, front_matter):
15
- content = frontmatter.dumps(front_matter) + "\nBody"
20
+ post = frontmatter.Post(content="Body", **front_matter)
21
+ content = frontmatter.dumps(post)
16
22
with open(path, 'w', encoding='utf-8') as f:
23
f.write(content)
24
0 commit comments