Skip to content

Commit 8680844

Browse files
committed
test_shell: Also test shell_plus
1 parent 0aa043f commit 8680844

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

tests/test_cli.py

+13-14
Original file line numberDiff line numberDiff line change
@@ -406,24 +406,18 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
406406
assert 'Please set' not in result.output
407407

408408

409+
@pytest.mark.parametrize("cli_cmd", ['shell', 'shell_plus'])
409410
@pytest.mark.parametrize(
410411
"cli_args,inputs,env,expected_output",
411412
[
412413
(
413-
['shell_plus', '-L{SOCKET_NAME}', '-c', 'print(str(server.socket_name))'],
414-
[],
415-
{},
416-
'{SERVER_SOCKET_NAME}',
417-
),
418-
(
419-
['shell', '-L{SOCKET_NAME}', '-c', 'print(str(server.socket_name))'],
414+
['-L{SOCKET_NAME}', '-c', 'print(str(server.socket_name))'],
420415
[],
421416
{},
422417
'{SERVER_SOCKET_NAME}',
423418
),
424419
(
425420
[
426-
'shell',
427421
'-L{SOCKET_NAME}',
428422
'{SESSION_NAME}',
429423
'-c',
@@ -435,7 +429,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
435429
),
436430
(
437431
[
438-
'shell',
439432
'-L{SOCKET_NAME}',
440433
'{SESSION_NAME}',
441434
'{WINDOW_NAME}',
@@ -448,7 +441,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
448441
),
449442
(
450443
[
451-
'shell',
452444
'-L{SOCKET_NAME}',
453445
'{SESSION_NAME}',
454446
'{WINDOW_NAME}',
@@ -461,7 +453,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
461453
),
462454
(
463455
[
464-
'shell',
465456
'-L{SOCKET_NAME}',
466457
'{SESSION_NAME}',
467458
'{WINDOW_NAME}',
@@ -474,7 +465,6 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
474465
),
475466
(
476467
[
477-
'shell',
478468
'-L{SOCKET_NAME}',
479469
'-c',
480470
'print(pane.id)',
@@ -486,7 +476,15 @@ def test_load_zsh_autotitle_warning(cli_args, tmpdir, monkeypatch):
486476
],
487477
)
488478
def test_shell(
489-
cli_args, inputs, expected_output, env, tmpdir, monkeypatch, server, session
479+
cli_cmd,
480+
cli_args,
481+
inputs,
482+
expected_output,
483+
env,
484+
tmpdir,
485+
monkeypatch,
486+
server,
487+
session,
490488
):
491489
monkeypatch.setenv('HOME', str(tmpdir))
492490
window_name = 'my_window'
@@ -502,7 +500,8 @@ def test_shell(
502500
SERVER_SOCKET_NAME=server.socket_name,
503501
)
504502

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

0 commit comments

Comments
 (0)