Skip to content

Commit 3ea71ff

Browse files
committed
Update tests
1 parent 3ed8891 commit 3ea71ff

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
from libtmux.exc import LibTmuxException
1616
from tmuxp import cli, config, exc
1717
from tmuxp.cli import (
18-
command_ls,
1918
command_debug_info,
19+
command_ls,
2020
get_config_dir,
2121
is_pure_name,
2222
load_workspace,
@@ -533,7 +533,7 @@ def test_shell(
533533
{},
534534
{},
535535
LibTmuxException,
536-
r'.*DoesNotExist\s\(No such file or directory\).*',
536+
r'.*DoesNotExist.*',
537537
),
538538
(
539539
[

tmuxp/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ def raise_if_tmux_not_running(server):
8383
try:
8484
server.sessions
8585
except LibTmuxException as e:
86-
if 'No such file or directory' in str(e):
86+
if any(
87+
needle in str(e)
88+
for needle in ['No such file or directory', 'no server running on']
89+
):
8790
raise LibTmuxException(
8891
'no tmux session found. Start a tmux session and try again. \n'
8992
'Original error: ' + str(e)

0 commit comments

Comments
 (0)