mirror of
https://github.com/ivan-usov-org/bec.git
synced 2025-04-21 18:20:01 +02:00
22 lines
450 B
Python
22 lines
450 B
Python
import os
|
|
|
|
from bec_lib.pdf_writer import PDFWriter
|
|
|
|
|
|
def test_pdf_writer():
|
|
with PDFWriter("test_output.pdf") as file:
|
|
file.write("Hello World")
|
|
|
|
assert os.path.exists("test_output.pdf")
|
|
|
|
os.remove("test_output.pdf")
|
|
|
|
|
|
def test_pdf_writer_with_title():
|
|
with PDFWriter("test_output.pdf", title="title") as file:
|
|
file.write("Hello World")
|
|
|
|
assert os.path.exists("test_output.pdf")
|
|
|
|
os.remove("test_output.pdf")
|