mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-03 16:43:54 -06:00
fix: one box height per diagram row
This commit is contained in:
1 parent
93e66a7c5d
commit
7e7befd7a3
2 files changed
+20
-13
No files matched your search
@@ -328,10 +328,14 @@ class DiagramText(unittest.TestCase):
|
||||
html = sitediagrams.figure_html("bios-chain")
|
||||
self.assertRegex(html, r'<text [^>]*style="font-family: var\(--sl-font-mono[^>]*>/userdata/bios/</text>')
|
||||
|
||||
def test_boxes_take_the_height_of_their_lines(self):
|
||||
width, _height, body = sitediagrams.flow(sitediagrams._bios_chain_boxes(), False, sitediagrams.WIDE)
|
||||
heights = {float(h) for h in re.findall(r'<rect [^>]*height="([\d.]+)"[^>]*class="rb-d-box', "".join(body))}
|
||||
self.assertGreater(len(heights), 1)
|
||||
def test_boxes_of_a_row_share_one_height(self):
|
||||
for layout in (sitediagrams.flow, sitediagrams.columns):
|
||||
for vertical, total in ((False, sitediagrams.WIDE), (True, sitediagrams.NARROW)):
|
||||
_width, _height, body = layout(sitediagrams._bios_chain_boxes(), vertical, total)
|
||||
heights = {float(h) for h in re.findall(r'<rect [^>]*height="([\d.]+)"[^>]*class="rb-d-box',
|
||||
"".join(body))}
|
||||
with self.subTest(layout=layout.__name__, vertical=vertical):
|
||||
self.assertEqual(len(heights), 1)
|
||||
|
||||
|
||||
class ExampleHashesStayOutOfSearch(unittest.TestCase):
|
||||
|
||||
Reference in new issue
Block a user