Files
50ohm/test/test_comment.py
T
2024-12-11 01:16:29 +01:00

33 lines
988 B
Python

import mistletoe
import pytest
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
from renderer.fifty_ohm_latex_renderer import FiftyOhmLaTeXRenderer
from test.util import paragraph
@pytest.mark.html
def test_comment_html():
assertions = {
"%Comment\nBar": "Bar",
# TODO: This test is not working as expected. The comment should be removed
# "%Comment\n" : "a",
"Foo\n%Comment\nBar": "Foo\nBar",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
@pytest.mark.latex
def test_comment_latex():
assertions = {
"%Comment\nBar": "\nBar\n",
# TODO: This test is not working as expected. The comment should be removed
# "%Comment\n" : "a",
"Foo\n%Comment\nBar": "\nFoo\nBar\n",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == assertions[assertion]