Pull request #29: feature: add photos

Merge in FRAG/50ohm.de from feature/photo to main

* commit 'd73914b2b9c0523dc15e98764d4e39e85c0bf34c':
  feature: add thest for photo
  feature: add photos
This commit is contained in:
Prof.Dr. Matthias Jung DL9MJ
2025-05-14 18:39:27 +00:00
4 changed files with 77 additions and 9 deletions
+26
View File
@@ -0,0 +1,26 @@
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_photo_html():
assertions = {
"[photo:123:abc:Text]": FiftyOhmHtmlRenderer.render_photo_helper("123", "abc", "Text", "TODO"),
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
@pytest.mark.latex
def test_photo_latex():
assertions = {
"[photo:123:abc:Text]": FiftyOhmLaTeXRenderer.render_photo_helper("123", "abc", "Text", "TODO"),
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == "\n" + assertions[assertion] + "\n"