MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_fail_fast_per_hook

Function test_fail_fast_per_hook

tests/commands/run_test.py:1079–1088  ·  view source on GitHub ↗
(cap_out, store, repo_with_failing_hook)

Source from the content-addressed store, hash-verified

1077
1078
1079def test_fail_fast_per_hook(cap_out, store, repo_with_failing_hook):
1080 with modify_config() as config:
1081 # More than one hook
1082 config['repos'][0]['hooks'] *= 2
1083 config['repos'][0]['hooks'][0]['fail_fast'] = True
1084 stage_a_file()
1085
1086 ret, printed = _do_run(cap_out, store, repo_with_failing_hook, run_opts())
1087 # it should have only run one hook
1088 assert printed.count(b'Failing hook') == 1
1089
1090
1091def test_fail_fast_not_prev_failures(cap_out, store, repo_with_failing_hook):

Callers

nothing calls this directly

Calls 4

modify_configFunction · 0.90
run_optsFunction · 0.90
stage_a_fileFunction · 0.85
_do_runFunction · 0.85

Tested by

no test coverage detected