(
tempdir_factory,
store,
repo_path,
hook_id,
args,
expected,
expected_return_code=0,
config_kwargs=None,
color=False,
)
| 62 | |
| 63 | |
| 64 | def _test_hook_repo( |
| 65 | tempdir_factory, |
| 66 | store, |
| 67 | repo_path, |
| 68 | hook_id, |
| 69 | args, |
| 70 | expected, |
| 71 | expected_return_code=0, |
| 72 | config_kwargs=None, |
| 73 | color=False, |
| 74 | ): |
| 75 | path = make_repo(tempdir_factory, repo_path) |
| 76 | config = make_config_from_repo(path, **(config_kwargs or {})) |
| 77 | hook = _get_hook(config, store, hook_id) |
| 78 | ret, out = _hook_run(hook, args, color=color) |
| 79 | assert ret == expected_return_code |
| 80 | assert out == expected |
| 81 | |
| 82 | |
| 83 | def test_missing_executable(tempdir_factory, store): |
no test coverage detected