From f2317a491b08697e94684232e3848e3bb524844d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 4 Feb 2023 13:08:31 -0800 Subject: [PATCH] fix cli_run fixture --- tests/lib/when_steps.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/lib/when_steps.py b/tests/lib/when_steps.py index 5531d67c..660f7a28 100644 --- a/tests/lib/when_steps.py +++ b/tests/lib/when_steps.py @@ -32,7 +32,7 @@ all_input = '("(?P[^"]*)")' @when(re(f'we run "jrnl ?{command}" and {input_method} {all_input}')) @when(parse('we run "jrnl {command}"')) @when('we run "jrnl"') -def we_run_jrnl(cli_run, capsys, keyring, request, command, input_method, all_input): +def we_run_jrnl(capsys, keyring, request, command, input_method, all_input): from keyring import set_keyring set_keyring(keyring) @@ -42,6 +42,8 @@ def we_run_jrnl(cli_run, capsys, keyring, request, command, input_method, all_in inject_fixture(request, "input_method", input_method) inject_fixture(request, "all_input", all_input) + cli_run = request.getfixturevalue("cli_run") + with ExitStack() as stack: mocks = cli_run["mocks"] factories = cli_run["mock_factories"]