Skip to content

Commit

Permalink
test(main-horizontal): Fix layout issue
Browse files Browse the repository at this point in the history
The comparison between height of main and other panes isn't true,
we should update libtmux to support tmux's new formatters.
  • Loading branch information
tony committed Sep 10, 2022
1 parent 3f745fd commit d703b65
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_workspacebuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,15 @@ def height(p):
def width(p):
return int(p._info["pane_width"])

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

def is_almost_equal(x, y):
Expand Down

0 comments on commit d703b65

Please sign in to comment.