update run_latex test

This commit is contained in:
Sina Atalay 2023-10-09 20:58:51 +02:00
parent 5c7f2e684f
commit 595212cd97
2 changed files with 5 additions and 3 deletions

View File

@ -264,7 +264,7 @@ def read_input_file(file_path: str) -> RenderCVDataModel:
return data
def render_template(data: RenderCVDataModel, output_path: str = None):
def render_template(data: RenderCVDataModel, output_path: str = None) -> str:
"""Render the template using the given data.
Args:

View File

@ -405,8 +405,10 @@ class TestDataModel(unittest.TestCase):
os.path.dirname(__file__), "reference_files", "John_Doe_CV.tex"
)
rendering.run_latex(latex_file_path)
pdf_file = rendering.run_latex(latex_file_path)
# Check if the output file exists:
self.assertTrue(os.path.exists(pdf_file))
if __name__ == "__main__":
unittest.main()