Skip to content

Commit d69bdc1

Browse files
authored
ci: Add tmuxp 3.2, test fixes (#312)
2 parents a1e8703 + 6ea1129 commit d69bdc1

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version: ["3.x"]
14-
tmux-version: ["2.6", "2.7", "2.8", "3.0a", "3.1b", "master"]
14+
tmux-version: ["2.6", "2.7", "2.8", "3.0a", "3.1b", "3.2a", "master"]
1515
steps:
1616
- uses: actions/checkout@v1
1717

requirements/dev.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
isort==4.3.20
2-
flake8==3.7.7
1+
isort<5
2+
flake8<4
3+
twine

requirements/doc.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
docutils>=0.14
22
sphinx>=4.0.0
33
sphinx_issues==1.2.0
4-
alagitpull>=0.1.0
4+
alagitpull>=0.6.0

tests/test_server.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import logging
66

77
from libtmux import Server
8+
from libtmux.common import has_gte_version
89

910
logger = logging.getLogger(__name__)
1011

@@ -42,8 +43,11 @@ def test_config(server):
4243
def test_256_colors(server):
4344
myserver = Server(colors=256)
4445
assert myserver.colors == 256
46+
print(myserver.colors)
4547

46-
proc = myserver.cmd('list-servers')
48+
proc = myserver.cmd('list-sessions')
49+
50+
print('list-sessions', proc)
4751

4852
assert '-2' in proc.cmd
4953
assert '-8' not in proc.cmd
@@ -53,7 +57,7 @@ def test_88_colors(server):
5357
myserver = Server(colors=88)
5458
assert myserver.colors == 88
5559

56-
proc = myserver.cmd('list-servers')
60+
proc = myserver.cmd('list-sessions')
5761

5862
assert '-8' in proc.cmd
5963
assert '-2' not in proc.cmd
@@ -97,4 +101,8 @@ def test_new_session_shell(server):
97101
pane = window.list_panes()[0]
98102
assert mysession.get("session_name") == "test_new_session"
99103
assert server.has_session("test_new_session")
100-
assert pane.get('pane_start_command') == cmd
104+
105+
if has_gte_version('3.2'):
106+
assert pane.get('pane_start_command').replace('"', '') == cmd
107+
else:
108+
assert pane.get('pane_start_command') == cmd

tests/test_window.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ def test_split_window_shell(session):
115115
assert len(window.panes) == 2
116116
assert isinstance(pane, Pane)
117117
assert float(window.panes[0].height) <= ((float(window.width) + 1) / 2)
118-
assert pane.get('pane_start_command') == cmd
118+
if has_gte_version('3.2'):
119+
assert pane.get('pane_start_command').replace('"', '') == cmd
120+
else:
121+
assert pane.get('pane_start_command') == cmd
119122

120123

121124
def test_split_window_horizontal(session):

0 commit comments

Comments
 (0)