Skip to content

Commit 2357656

Browse files
committed
test_shell: Also test shell_plus
1 parent 49735cb commit 2357656

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

tests/test_cli.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -407,24 +407,18 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
407407
assert 'Please set' not in result.output
408408

409409

410+
@pytest.mark.parametrize("cli_cmd", ['shell', 'shell_plus'])
410411
@pytest.mark.parametrize(
411412
"cli_args,inputs,env,expected_output",
412413
[
413414
(
414-
['shell_plus', '-L{SOCKET_NAME}', '-c', 'print(str(server.socket_name))'],
415-
[],
416-
{},
417-
'{SERVER_SOCKET_NAME}',
418-
),
419-
(
420-
['shell', '-L{SOCKET_NAME}', '-c', 'print(str(server.socket_name))'],
415+
['-L{SOCKET_NAME}', '-c', 'print(str(server.socket_name))'],
421416
[],
422417
{},
423418
'{SERVER_SOCKET_NAME}',
424419
),
425420
(
426421
[
427-
'shell',
428422
'-L{SOCKET_NAME}',
429423
'{SESSION_NAME}',
430424
'-c',
@@ -436,7 +430,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
436430
),
437431
(
438432
[
439-
'shell',
440433
'-L{SOCKET_NAME}',
441434
'{SESSION_NAME}',
442435
'{WINDOW_NAME}',
@@ -449,7 +442,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
449442
),
450443
(
451444
[
452-
'shell',
453445
'-L{SOCKET_NAME}',
454446
'{SESSION_NAME}',
455447
'{WINDOW_NAME}',
@@ -462,7 +454,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
462454
),
463455
(
464456
[
465-
'shell',
466457
'-L{SOCKET_NAME}',
467458
'{SESSION_NAME}',
468459
'{WINDOW_NAME}',
@@ -475,7 +466,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
475466
),
476467
(
477468
[
478-
'shell',
479469
'-L{SOCKET_NAME}',
480470
'-c',
481471
'print(pane.id)',
@@ -487,7 +477,15 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
487477
],
488478
)
489479
def test_shell(
490-
cli_args, inputs, expected_output, env, tmpdir, monkeypatch, server, session
480+
cli_cmd,
481+
cli_args,
482+
inputs,
483+
expected_output,
484+
env,
485+
tmpdir,
486+
monkeypatch,
487+
server,
488+
session,
491489
):
492490
monkeypatch.setenv('HOME', str(tmpdir))
493491
window_name = 'my_window'
@@ -503,7 +501,8 @@ def test_shell(
503501
SERVER_SOCKET_NAME=server.socket_name,
504502
)
505503

506-
cli_args[:] = [cli_arg.format(**template_ctx) for cli_arg in cli_args]
504+
cli_args = [cli_cmd] + [cli_arg.format(**template_ctx) for cli_arg in cli_args]
505+
507506
for k, v in env.items():
508507
monkeypatch.setenv(k, v.format(**template_ctx))
509508

0 commit comments

Comments
 (0)