Print hookid on failure.

This commit is contained in:
Anthony Sottile 2014-07-22 06:54:48 -07:00
parent 196fd87df0
commit b8c8120f2a
3 changed files with 3 additions and 1 deletions

View file

@ -157,6 +157,7 @@ FAILING_PRE_COMMIT_RUN = re.compile(
r'\[INFO\] Once installed this environment will be reused\.\n'
r'\[INFO\] This may take a few minutes\.\.\.\n'
r'Failing hook\.+Failed\n'
r'hookid: failing_hook\n'
r'\n'
r'Fail\n'
r'foo\n'

View file

@ -77,7 +77,7 @@ def test_run_all_hooks_failing(
_test_run(
repo_with_failing_hook,
{},
('Failing hook', 'Failed', 'Fail\nfoo.py\n'),
('Failing hook', 'Failed', 'hookid: failing_hook', 'Fail\nfoo.py\n'),
1,
True,
)