- Editions replaced by INSTEG, HAREC and UPPGRADERING (Instegscertifikat -> HAREC) - Question pool optional; simulator, homework tool and solutions switch off without one - All UI strings, templates, renderers and project JS localised to sv-SE (decimal comma, Swedish non-breaking-space rules, Å/Ä/Ö in Morse table) - DARC branding, membership CTA and German links removed; attribution footer added - Page names centralised in src/pages.py - README and docs rewritten in Swedish Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
32 lines
897 B
Python
32 lines
897 B
Python
import mistletoe
|
|
import pytest
|
|
|
|
from renderer.fifty_ohm_latex_renderer import FiftyOhmLaTeXRenderer
|
|
from test.util import paragraph, render_html
|
|
|
|
|
|
@pytest.mark.html
|
|
def test_comment_html():
|
|
assertions = {
|
|
"%Comment\nBar": paragraph("Bar"),
|
|
"%Comment\n": "",
|
|
"Foo 100 % Bar": paragraph("Foo 100 % Bar"),
|
|
"Foo\n%Comment\nBar": paragraph("Foo") + paragraph("Bar"),
|
|
}
|
|
|
|
for assertion in assertions:
|
|
assert render_html(assertion) == assertions[assertion]
|
|
|
|
|
|
@pytest.mark.latex
|
|
def test_comment_latex():
|
|
assertions = {
|
|
"%Comment\nBar": "% Comment\n\nBar\n",
|
|
"%Comment\n": "% Comment\n",
|
|
"Foo 100 % Bar": "\nFoo 100 \\% Bar\n",
|
|
"Foo\n%Comment\nBar": "\nFoo\n% Comment\n\nBar\n",
|
|
}
|
|
|
|
for assertion in assertions:
|
|
assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == assertions[assertion]
|