mirror of https://github.com/eyhc1/rendercv.git
fix escape characters test in test_data_model.py
This commit is contained in:
parent
9b9e8dd7e1
commit
d60a604741
|
@ -17,12 +17,10 @@ class TestDataModel(unittest.TestCase):
|
||||||
self.assertEqual(result, expected)
|
self.assertEqual(result, expected)
|
||||||
|
|
||||||
str_with_latex_characers = r"asdf#asdf$asdf%asdf& ~ fd_ \ ^aa aa{ bb}"
|
str_with_latex_characers = r"asdf#asdf$asdf%asdf& ~ fd_ \ ^aa aa{ bb}"
|
||||||
expected = (
|
expected ='asdf\\#asdf$asdf\\%asdf\\& \\textasciitilde{} fd_ \\ ^aa aa\\{ bb\\}'
|
||||||
r"asdf\#asdf\$asdf\%asdf\& \textasciitilde{} fd\_ \textbackslash{}"
|
|
||||||
r" \textasciicircum{}aa aa\{ bb\}"
|
|
||||||
)
|
|
||||||
with self.subTest(msg="string with LaTeX characters"):
|
with self.subTest(msg="string with LaTeX characters"):
|
||||||
result = data_model.escape_latex_characters(str_with_latex_characers)
|
result = data_model.escape_latex_characters(str_with_latex_characers)
|
||||||
|
print(result)
|
||||||
self.assertEqual(result, expected)
|
self.assertEqual(result, expected)
|
||||||
|
|
||||||
def test_compute_time_span_string(self):
|
def test_compute_time_span_string(self):
|
||||||
|
|
Loading…
Reference in New Issue