(tmpdir)
| 84 | |
| 85 | |
| 86 | def 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( |
nothing calls this directly
no test coverage detected