refactor: use paragraph test helper

This commit is contained in:
Tim Grelka
2024-12-11 01:09:53 +01:00
parent 7ef19075ee
commit e5d7fe888f
2 changed files with 12 additions and 11 deletions
+4 -3
View File
@@ -2,18 +2,19 @@ import mistletoe
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
from renderer.fifty_ohm_latex_renderer import FiftyOhmLaTeXRenderer
from test.util import paragraph
def test_comment_html():
assertions = {
"%Comment\nBar": "<p>Bar</p>\n",
"%Comment\nBar": "Bar",
# TODO: This test is not working as expected. The comment should be removed
# "%Comment\n" : "a",
"Foo\n%Comment\nBar": "<p>Foo\nBar</p>\n",
"Foo\n%Comment\nBar": "Foo\nBar",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == assertions[assertion]
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
def test_comment_latex():