mirror of https://github.com/eyhc1/rendercv.git
improve run_latex test
This commit is contained in:
parent
178b4616c1
commit
71e05ad26a
|
@ -338,7 +338,7 @@ def render_template(data: RenderCVDataModel, output_path: str = None) -> str:
|
||||||
|
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
time_taken = end_time - start_time
|
time_taken = end_time - start_time
|
||||||
logger.info(f"Rendering the LaTeX file has finished in {time_taken:.2f} s.")
|
logger.info(f"Rendering the LaTeX file ({output_file_path}) has finished in {time_taken:.2f} s.")
|
||||||
|
|
||||||
return output_file_path
|
return output_file_path
|
||||||
|
|
||||||
|
@ -395,9 +395,7 @@ def run_latex(latex_file_path):
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
time_taken = end_time - start_time
|
time_taken = end_time - start_time
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Running TinyTeX to generate the PDF has finished in {time_taken:.2f} s."
|
f"Running TinyTeX to generate the PDF ({output_file_path}) has finished in {time_taken:.2f} s."
|
||||||
)
|
)
|
||||||
|
|
||||||
return os.path.join(
|
return output_file_path
|
||||||
os.path.dirname(latex_file_path), latex_file.replace(".tex", ".pdf")
|
|
||||||
)
|
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
\LenToUnit{\paperwidth-1.35 cm},
|
\LenToUnit{\paperwidth-1.35 cm},
|
||||||
\LenToUnit{\paperheight-0.675 cm}
|
\LenToUnit{\paperheight-0.675 cm}
|
||||||
){\vtop{{\null}\makebox[0pt][c]{
|
){\vtop{{\null}\makebox[0pt][c]{
|
||||||
\small\color{gray}\emph{Last updated on REPLACE_THIS_WITH_TODAY} \hspace{\widthof{Last updated on REPLACE_THIS_WITH_TODAY}}
|
\small\color{gray}\emph{Last updated on REPLACETHISWITHTODAY} \hspace{\widthof{Last updated on REPLACETHISWITHTODAY}}
|
||||||
}}}%
|
}}}%
|
||||||
}%
|
}%
|
||||||
}%
|
}%
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -377,7 +377,7 @@ class TestDataModel(unittest.TestCase):
|
||||||
with open(reference_file_path, "r") as file:
|
with open(reference_file_path, "r") as file:
|
||||||
reference = file.read()
|
reference = file.read()
|
||||||
reference = reference.replace(
|
reference = reference.replace(
|
||||||
"REPLACE_THIS_WITH_TODAY", rendering.get_today()
|
"REPLACETHISWITHTODAY", rendering.get_today()
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertEqual(output, reference)
|
self.assertEqual(output, reference)
|
||||||
|
|
Loading…
Reference in New Issue