feature: add comment test

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2024-12-08 10:14:35 +01:00
parent bedab8faa8
commit bc53eb0f9e
3 changed files with 46 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
import mistletoe
import pytest
from mistletoe.ast_renderer import AstRenderer
from renderer.comment import BlockComment, SpanComment
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
from test.util import paragraph
def test_comment_html(capsys) :
assertions = {
"%Comment\nBar" : "<p>Bar</p>\n",
# 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",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == assertions[assertion]