BigUpdate
Python application / build (push) Has been cancelled

This commit is contained in:
Igor20264
2026-09-03 10:44:08 +03:00
parent d2da20fdb2
commit 516abe7b83
177 changed files with 40178 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
import unittest
from md2gost.layout_tracker import LayoutTracker
from md2gost.renderable.paragraph import Paragraph
from . import _create_test_document, _EMUS_PER_PX
class TestParagraph(unittest.TestCase):
def setUp(self) -> None:
self._document, self._max_height, self._max_width = _create_test_document()
def test_render(self):
paragraph = Paragraph(self._document._body)
layout_tracker = LayoutTracker(self._max_height, self._max_width)
paragraph.add_run("hello world")
info = list(paragraph.render(None, layout_tracker.current_state))[0]
self.assertAlmostEqual(45.5, info.height / _EMUS_PER_PX, delta=1/3)