From 4a320cfaeb6777f0e1db8a7da872bbd4a6ea65de Mon Sep 17 00:00:00 2001 From: "Prof. Dr. Matthias Jung DL9MJ" Date: Sun, 8 Dec 2024 16:57:01 +0100 Subject: [PATCH] feature: add latex comment --- test/test_comment.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/test/test_comment.py b/test/test_comment.py index 9abf3ce..c8ee2db 100644 --- a/test/test_comment.py +++ b/test/test_comment.py @@ -1,13 +1,10 @@ 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 +from renderer.fifty_ohm_latex_renderer import FiftyOhmLaTeXRenderer -def test_comment_html(capsys) : +def test_comment_html() : assertions = { "%Comment\nBar" : "

Bar

\n", @@ -18,3 +15,15 @@ def test_comment_html(capsys) : for assertion in assertions: assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == assertions[assertion] + +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]