From 0d3ff086c5f377b214af0a43dd7ce853d4ba30ad Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Tue, 29 Dec 2020 17:58:51 -0600 Subject: [PATCH] Add test for --no-zle shell option --- test/test_enter.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/test_enter.py b/test/test_enter.py index a834275..5901e61 100644 --- a/test/test_enter.py +++ b/test/test_enter.py @@ -63,8 +63,12 @@ def test_enter(runner, yadm_cmd, paths, shell, success): 'cmd', [False, 'cmd', 'cmd-bad-exit'], ids=['no-cmd', 'cmd', 'cmd-bad-exit']) +@pytest.mark.parametrize( + 'term', ['', 'dumb'], + ids=['term-empty', 'term-dumb']) @pytest.mark.usefixtures('ds1_copy') -def test_enter_shell_ops(runner, yadm_cmd, paths, shell, opts, path, cmd): +def test_enter_shell_ops(runner, yadm_cmd, paths, shell, + opts, path, cmd, term): """Enter tests for specific shell options""" change_exit = '\nfalse' if cmd == 'cmd-bad-exit' else '' @@ -83,8 +87,12 @@ def test_enter_shell_ops(runner, yadm_cmd, paths, shell, opts, path, cmd): enter_cmd += test_cmd env = os.environ.copy() + env['TERM'] = term env['SHELL'] = custom_shell + if shell == 'zsh' and term == 'dumb': + opts += ' --no-zle' + run = runner(command=yadm_cmd(*enter_cmd), env=env) if cmd == 'cmd-bad-exit': assert run.failure