feat: count references during parsing for pictures
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
import mistletoe
|
||||
import pytest
|
||||
|
||||
from renderer.document import Document
|
||||
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_picture_html():
|
||||
assertions = {
|
||||
"[picture:0:abc:Text]": FiftyOhmHtmlRenderer.render_picture_helper("0", "abc", "Text", "TODO", ""),
|
||||
}
|
||||
assertions = {"[picture:0:abc:Text]": ("0", "abc", "Text", "A-5.7.1", "")}
|
||||
|
||||
for assertion in assertions:
|
||||
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
|
||||
with FiftyOhmHtmlRenderer(edition="A", chapter="5", section="7") as renderer:
|
||||
for assertion in assertions:
|
||||
assert renderer.render(Document(assertion)) == renderer.render_picture_helper(*assertions[assertion]) + "\n"
|
||||
|
||||
|
||||
@pytest.mark.latex
|
||||
|
||||
Reference in New Issue
Block a user