Skip to content

Commit 61c167f

Browse files
committed
!squash test pane 3.0+
1 parent 19eaddb commit 61c167f

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

tests/test_pane.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66

7-
from libtmux.common import has_lt_version
7+
from libtmux.common import has_gte_version, has_lt_version
88
from libtmux.constants import ResizeAdjustmentDirection
99
from libtmux.session import Session
1010

@@ -173,20 +173,21 @@ def test_resize_pane(
173173
)
174174
assert int(pane.pane_width) == 75
175175

176-
# Manual: Height percentage
177-
window.select_layout("main-vertical")
178-
pane_height_before = int(pane.pane_height)
179-
pane.resize_pane(
180-
height="15%",
181-
)
182-
assert int(pane.pane_height) == 75
183-
184-
# Manual: Width percentage
185-
window.select_layout("main-horizontal")
186-
pane.resize_pane(
187-
width="15%",
188-
)
189-
assert int(pane.pane_width) == 75
176+
if has_gte_version("3.0"):
177+
# Manual: Height percentage
178+
window.select_layout("main-vertical")
179+
pane_height_before = int(pane.pane_height)
180+
pane.resize_pane(
181+
height="15%",
182+
)
183+
assert int(pane.pane_height) == 75
184+
185+
# Manual: Width percentage
186+
window.select_layout("main-horizontal")
187+
pane.resize_pane(
188+
width="15%",
189+
)
190+
assert int(pane.pane_width) == 75
190191

191192
#
192193
# Adjustments

0 commit comments

Comments
 (0)