File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 7
7
8
8
import pytest
9
9
10
- import kaptan
11
-
12
10
import click
11
+ import kaptan
13
12
from click .testing import CliRunner
13
+ from tmuxp_test_plugin_bwb .plugin import PluginBeforeWorkspaceBuilder
14
14
15
15
import libtmux
16
16
from libtmux .common import has_lt_version
17
17
from libtmux .exc import LibTmuxException
18
18
from tmuxp import cli , config , exc
19
19
from tmuxp .cli import (
20
+ _reattach ,
20
21
command_ls ,
21
22
get_config_dir ,
22
23
is_pure_name ,
24
+ load_plugins ,
23
25
load_workspace ,
24
26
scan_config ,
25
- _reattach ,
26
- load_plugins ,
27
27
)
28
28
from tmuxp .workspacebuilder import WorkspaceBuilder
29
- from tmuxp_test_plugin_bwb .plugin import PluginBeforeWorkspaceBuilder
30
29
31
30
from .fixtures ._util import curjoin , loadfixture
32
31
@@ -538,7 +537,7 @@ def test_shell(
538
537
{},
539
538
{},
540
539
LibTmuxException ,
541
- r'.*DoesNotExist\s\(No such file or directory\) .*' ,
540
+ r'.*DoesNotExist.*' ,
542
541
),
543
542
(
544
543
[
Original file line number Diff line number Diff line change @@ -83,7 +83,10 @@ def raise_if_tmux_not_running(server):
83
83
try :
84
84
server .sessions
85
85
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
+ ):
87
90
raise LibTmuxException (
88
91
'no tmux session found. Start a tmux session and try again. \n '
89
92
'Original error: ' + str (e )
You can’t perform that action at this time.
0 commit comments