Files
50ohm/test/test_dash.py
T
2024-12-11 01:16:29 +01:00

27 lines
677 B
Python

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_dash_html():
assertions = {
"Foo - Bar": "Foo – Bar",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
@pytest.mark.latex
def test_dash_latex():
assertions = {
"Foo - Bar": "\nFoo -- Bar\n",
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == assertions[assertion]