mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add a hook option that allows stdout to be printed when exit code is 0 (#695)
This commit is contained in:
parent
7f0b427b74
commit
b319d6f80c
4 changed files with 23 additions and 1 deletions
|
|
@ -292,6 +292,23 @@ def test_always_run_alt_config(
|
|||
)
|
||||
|
||||
|
||||
def test_hook_verbose_enabled(
|
||||
cap_out, repo_with_passing_hook, mock_out_store_directory,
|
||||
):
|
||||
with modify_config() as config:
|
||||
config['repos'][0]['hooks'][0]['always_run'] = True
|
||||
config['repos'][0]['hooks'][0]['verbose'] = True
|
||||
|
||||
_test_run(
|
||||
cap_out,
|
||||
repo_with_passing_hook,
|
||||
{},
|
||||
(b'Hello World',),
|
||||
0,
|
||||
stage=False,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
('origin', 'source', 'expect_failure'),
|
||||
(
|
||||
|
|
|
|||
|
|
@ -789,4 +789,5 @@ def test_manifest_hooks(tempdir_factory, store):
|
|||
'stages': [],
|
||||
'types': ['file'],
|
||||
'exclude_types': [],
|
||||
'verbose': False,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue