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

Function test_run_legacy_recursive

tests/commands/hook_impl_test.py:86–96  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

84
85
86def test_run_legacy_recursive(tmpdir):
87 hook = tmpdir.join('pre-commit.legacy').ensure()
88 make_executable(hook)
89
90 # simulate a call being recursive
91 def call(*_, **__):
92 return hook_impl._run_legacy('pre-commit', tmpdir, ())
93
94 with mock.patch.object(subprocess, 'run', call):
95 with pytest.raises(SystemExit):
96 call()
97
98
99@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

make_executableFunction · 0.90
callFunction · 0.85

Tested by

no test coverage detected