From 595212cd97d60ebd0fe1486fb2852c0dd0bd5759 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Mon, 9 Oct 2023 20:58:51 +0200 Subject: [PATCH] update run_latex test --- rendercv/rendering.py | 2 +- tests/test_rendering.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rendercv/rendering.py b/rendercv/rendering.py index 4b03ae6..c6049bd 100644 --- a/rendercv/rendering.py +++ b/rendercv/rendering.py @@ -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: diff --git a/tests/test_rendering.py b/tests/test_rendering.py index 07917da..2aa59b7 100644 --- a/tests/test_rendering.py +++ b/tests/test_rendering.py @@ -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()