We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a880084 + 1b98f88 commit 3970d4bCopy full SHA for 3970d4b
1 file changed
tests/test_markdown_to_pdf.py
@@ -186,6 +186,20 @@ def test_end_to_end_conversion(self):
186
self.assertTrue(os.path.exists(output_file))
187
self.assertGreater(os.path.getsize(output_file), 0)
188
189
+ def test_empty_markdown_file(self):
190
+ """Verify conversion of an empty Markdown file creates a valid PDF."""
191
+ with tempfile.TemporaryDirectory() as tmpdir:
192
+ input_file = os.path.join(tmpdir, "empty.md")
193
+ output_file = os.path.join(tmpdir, "empty.pdf")
194
+
195
+ with open(input_file, "w", encoding="utf-8") as f:
196
+ f.write("")
197
198
+ convert_markdown_to_pdf(input_file, output_file, "Classic")
199
200
+ self.assertTrue(os.path.exists(output_file))
201
+ self.assertGreater(os.path.getsize(output_file), 0)
202
203
204
if __name__ == "__main__":
205
unittest.main()
0 commit comments