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

Function _test_run

tests/commands/run_test.py:145–156  ·  view source on GitHub ↗
(
    cap_out, store, repo, opts, expected_outputs, expected_ret, stage,
    config_file=C.CONFIG_FILE,
)

Source from the content-addressed store, hash-verified

143
144
145def _test_run(
146 cap_out, store, repo, opts, expected_outputs, expected_ret, stage,
147 config_file=C.CONFIG_FILE,
148):
149 if stage:
150 stage_a_file()
151 args = run_opts(**opts)
152 ret, printed = _do_run(cap_out, store, repo, args, config_file=config_file)
153
154 assert ret == expected_ret, (ret, expected_ret, printed)
155 for expected_output_part in expected_outputs:
156 assert expected_output_part in printed
157
158
159def test_run_all_hooks_failing(cap_out, store, repo_with_failing_hook):

Callers 15

test_runFunction · 0.85
test_run_output_logfileFunction · 0.85
test_always_runFunction · 0.85
test_no_textconvFunction · 0.85
test_commit_msg_hookFunction · 0.85
test_post_checkout_hookFunction · 0.85

Calls 3

run_optsFunction · 0.90
stage_a_fileFunction · 0.85
_do_runFunction · 0.85

Tested by

no test coverage detected