mirror of https://github.com/eyhc1/rendercv.git
update make_it_something tests
This commit is contained in:
parent
3c70ef26aa
commit
26b55e6c0c
|
@ -95,10 +95,14 @@ class TestRendering(unittest.TestCase):
|
||||||
def test_make_it_something(self):
|
def test_make_it_something(self):
|
||||||
# invalid input:
|
# invalid input:
|
||||||
input = "test"
|
input = "test"
|
||||||
keyword = "invalid keyword"
|
something = "haha"
|
||||||
with self.subTest(msg="invalid keyword"):
|
result = rendering.make_it_something(input, something)
|
||||||
with self.assertRaises(ValueError):
|
with self.subTest(msg="match_str is none"):
|
||||||
rendering.make_it_something(input, keyword)
|
self.assertEqual(result, "\\haha{test}")
|
||||||
|
|
||||||
|
result = rendering.make_it_something(input, something, match_str="te")
|
||||||
|
with self.subTest(msg="match_str is not none"):
|
||||||
|
self.assertEqual(result, "\\haha{te}st")
|
||||||
|
|
||||||
def test_make_it_bold(self):
|
def test_make_it_bold(self):
|
||||||
input = "some text"
|
input = "some text"
|
||||||
|
|
Loading…
Reference in New Issue