Skip to content

Commit d703b65

Browse files
committed
test(main-horizontal): Fix layout issue
The comparison between height of main and other panes isn't true, we should update libtmux to support tmux's new formatters.
1 parent 3f745fd commit d703b65

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_workspacebuilder.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,15 @@ def height(p):
12131213
def width(p):
12141214
return int(p._info["pane_width"])
12151215

1216-
assert height(main_horizontal_pane) > height(panes[0])
1216+
main_horizontal_pane_height = height(main_horizontal_pane)
1217+
pane_heights = [height(pane) for pane in panes]
1218+
# TODO: When libtmux has new pane formatters added, use that to detect top / bottom
1219+
assert all(
1220+
main_horizontal_pane_height != pane_height for pane_height in pane_heights
1221+
), "The top row should not be the same size as the bottom row (even though it can)"
1222+
assert all(
1223+
pane_heights[0] == pane_height for pane_height in pane_heights
1224+
), "The bottom row should be uniform height"
12171225
assert width(main_horizontal_pane) > width(panes[0])
12181226

12191227
def is_almost_equal(x, y):

0 commit comments

Comments
 (0)