feature: added tests for slides

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2025-06-24 22:04:42 +02:00
committed by Tim Grelka
parent 8a5a55371d
commit 283b6c8456
4 changed files with 43 additions and 7 deletions
+12 -1
View File
@@ -2,10 +2,11 @@ import mistletoe
import pytest
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
from renderer.fifty_ohm_html_slide_renderer import FiftyOhmHtmlSlideRenderer
@pytest.mark.html
def test_table_html():
def test_qso_html():
assertions = {
"<qso>\nfoo\n</qso>": FiftyOhmHtmlRenderer.render_tag_helper("qso", '<div class="qso_own">foo</div>\n', 1, 0)
+ "\n",
@@ -21,3 +22,13 @@ def test_table_html():
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == assertions[assertion]
@pytest.mark.slide
def test_qso_slide():
assertions = {
"<qso>\nfoo\n> bar\n</qso>":
'<div class="qso r-fit-text">\n<div class="qso_own fragment fade-right">foo</div>\n<div class="qso_other fragment fade-left">bar</div>\n</div>\n\n',
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlSlideRenderer) == assertions[assertion]