mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Allow spaces in system hooks. Closes #95.
This commit is contained in:
parent
53e316ade4
commit
61606cfaa4
5 changed files with 28 additions and 12 deletions
|
|
@ -102,6 +102,11 @@ def failing_hook_repo(dummy_git_repo):
|
|||
yield _make_repo(dummy_git_repo, 'failing_hook_repo')
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def system_hook_with_spaces_repo(dummy_git_repo):
|
||||
yield _make_repo(dummy_git_repo, 'system_hook_with_spaces_repo')
|
||||
|
||||
|
||||
def _make_config(path, hook_id, file_regex):
|
||||
config = {
|
||||
'repo': path,
|
||||
|
|
@ -138,6 +143,13 @@ def config_for_script_hooks_repo(script_hooks_repo):
|
|||
yield _make_config(script_hooks_repo, 'bash_hook', '')
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def config_for_system_hook_with_spaces(system_hook_with_spaces_repo):
|
||||
yield _make_config(
|
||||
system_hook_with_spaces_repo, 'system-hook-with-spaces', '',
|
||||
)
|
||||
|
||||
|
||||
def _make_repo_from_configs(*configs):
|
||||
with open(C.CONFIG_FILE, 'w') as config_file:
|
||||
yaml.dump(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue