Include hook id in output with --verbose. Closes #88.

This commit is contained in:
Anthony Sottile 2014-04-19 17:12:51 -07:00
parent edb04422b8
commit cce97ccba9
4 changed files with 177 additions and 36 deletions

View file

@ -330,3 +330,13 @@ def test_skip_hook(repo_with_passing_hook):
)
for msg in ('Bash hook', 'Skipped'):
assert msg in printed
def test_hook_id_not_in_non_verbose_output(repo_with_passing_hook):
ret, printed = _do_run(repo_with_passing_hook, _get_opts(verbose=False))
assert '[bash_hook]' not in printed
def test_hook_id_in_verbose_output(repo_with_passing_hook):
ret, printed = _do_run(repo_with_passing_hook, _get_opts(verbose=True))
assert '[bash_hook] Bash hook' in printed