Add a hook option that allows stdout to be printed when exit code is 0 (#695)

This commit is contained in:
Bastien Gérard 2018-01-31 23:05:35 +01:00
parent 7f0b427b74
commit b319d6f80c
4 changed files with 23 additions and 1 deletions

View file

@ -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'),
(

View file

@ -789,4 +789,5 @@ def test_manifest_hooks(tempdir_factory, store):
'stages': [],
'types': ['file'],
'exclude_types': [],
'verbose': False,
}