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:
@@ -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"
|
||||
Reference in New Issue
Block a user