Skip to content

Commit 59dc947

Browse files
committed
tests(test_pane): Check at_{left,right,bottom,top}
1 parent b7736a2 commit 59dc947

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_pane.py

+13
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,27 @@ def test_split_pane_size(session: Session) -> None:
236236
short_pane = pane.split(size=10)
237237
assert short_pane.pane_height == "10"
238238

239+
assert short_pane.at_left
240+
assert short_pane.at_right
241+
assert not short_pane.at_top
242+
assert short_pane.at_bottom
243+
239244
narrow_pane = pane.split(direction=PaneDirection.Right, size=10)
240245
assert narrow_pane.pane_width == "10"
241246

247+
assert not narrow_pane.at_left
248+
assert narrow_pane.at_right
249+
assert narrow_pane.at_top
250+
assert not narrow_pane.at_bottom
251+
242252
new_pane = pane.split(size="10%")
243253
assert new_pane.pane_height == "8"
244254

245255
new_pane = short_pane.split(direction=PaneDirection.Right, size="10%")
246256
assert new_pane.pane_width == "10"
257+
258+
assert not new_pane.at_left
259+
assert new_pane.at_right
247260
else:
248261
window_height_before = (
249262
int(window.window_height) if isinstance(window.window_height, str) else 0

0 commit comments

Comments
 (0)