Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
python-version: ["3.x"]
tmux-version: ["2.6", "2.7", "2.8", "3.0a", "3.1b", "master"]
tmux-version: ["2.6", "2.7", "2.8", "3.0a", "3.1b", "3.2a", "master"]
steps:
- uses: actions/checkout@v1

Expand Down
5 changes: 3 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
isort==4.3.20
flake8==3.7.7
isort<5
flake8<4
twine
2 changes: 1 addition & 1 deletion requirements/doc.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docutils>=0.14
sphinx>=4.0.0
sphinx_issues==1.2.0
alagitpull>=0.1.0
alagitpull>=0.6.0
14 changes: 11 additions & 3 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging

from libtmux import Server
from libtmux.common import has_gte_version

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -42,8 +43,11 @@ def test_config(server):
def test_256_colors(server):
myserver = Server(colors=256)
assert myserver.colors == 256
print(myserver.colors)

proc = myserver.cmd('list-servers')
proc = myserver.cmd('list-sessions')

print('list-sessions', proc)

assert '-2' in proc.cmd
assert '-8' not in proc.cmd
Expand All @@ -53,7 +57,7 @@ def test_88_colors(server):
myserver = Server(colors=88)
assert myserver.colors == 88

proc = myserver.cmd('list-servers')
proc = myserver.cmd('list-sessions')

assert '-8' in proc.cmd
assert '-2' not in proc.cmd
Expand Down Expand Up @@ -97,4 +101,8 @@ def test_new_session_shell(server):
pane = window.list_panes()[0]
assert mysession.get("session_name") == "test_new_session"
assert server.has_session("test_new_session")
assert pane.get('pane_start_command') == cmd

if has_gte_version('3.2'):
assert pane.get('pane_start_command').replace('"', '') == cmd
else:
assert pane.get('pane_start_command') == cmd
5 changes: 4 additions & 1 deletion tests/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def test_split_window_shell(session):
assert len(window.panes) == 2
assert isinstance(pane, Pane)
assert float(window.panes[0].height) <= ((float(window.width) + 1) / 2)
assert pane.get('pane_start_command') == cmd
if has_gte_version('3.2'):
assert pane.get('pane_start_command').replace('"', '') == cmd
else:
assert pane.get('pane_start_command') == cmd


def test_split_window_horizontal(session):
Expand Down