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

Function test_verbose_duration

tests/commands/run_test.py:292–299  ·  view source on GitHub ↗
(cap_out, store, in_git_dir, t1, t2, expected)

Source from the content-addressed store, hash-verified

290 ),
291)
292def test_verbose_duration(cap_out, store, in_git_dir, t1, t2, expected):
293 write_config('.', {'repo': 'meta', 'hooks': [{'id': 'identity'}]})
294 cmd_output('git', 'add', '.')
295 opts = run_opts(verbose=True)
296 with mock.patch.object(time, 'monotonic', side_effect=(t1, t2)):
297 ret, printed = _do_run(cap_out, store, str(in_git_dir), opts)
298 assert ret == 0
299 assert expected in printed
300
301
302@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

write_configFunction · 0.90
cmd_outputFunction · 0.90
run_optsFunction · 0.90
_do_runFunction · 0.85

Tested by

no test coverage detected