From c6dee597c58312c0c475ebbf5cbbbd8f26caece9 Mon Sep 17 00:00:00 2001 From: elagil Date: Sun, 13 Mar 2022 12:54:55 +0100 Subject: [PATCH] Add test case --- tests/commands/run_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/commands/run_test.py b/tests/commands/run_test.py index 085b063f..4e2d11cb 100644 --- a/tests/commands/run_test.py +++ b/tests/commands/run_test.py @@ -473,6 +473,22 @@ def test_hook_verbose_enabled(cap_out, store, repo_with_passing_hook): ) +def test_hook_prepend_name_enabled(cap_out, store, repo_with_failing_hook): + with modify_config() as config: + config['repos'][0]['hooks'][0]['always_run'] = True + config['repos'][0]['hooks'][0]['prepend_name'] = True + + _test_run( + cap_out, + store, + repo_with_failing_hook, + {}, + (b'Failing hook:',), + 1, + stage=False, + ) + + @pytest.mark.parametrize( ('from_ref', 'to_ref'), (('master', ''), ('', 'master')), )