mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
just use normal dicts in tests
This commit is contained in:
parent
2125a4cf47
commit
e4cf5f321b
7 changed files with 114 additions and 157 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import collections
|
||||
import functools
|
||||
import io
|
||||
import logging
|
||||
|
|
@ -120,19 +119,16 @@ def in_conflicting_submodule(tempdir_factory):
|
|||
@pytest.fixture
|
||||
def commit_msg_repo(tempdir_factory):
|
||||
path = git_dir(tempdir_factory)
|
||||
config = collections.OrderedDict((
|
||||
('repo', 'local'),
|
||||
(
|
||||
'hooks',
|
||||
[collections.OrderedDict((
|
||||
('id', 'must-have-signoff'),
|
||||
('name', 'Must have "Signed off by:"'),
|
||||
('entry', 'grep -q "Signed off by:"'),
|
||||
('language', 'system'),
|
||||
('stages', ['commit-msg']),
|
||||
))],
|
||||
),
|
||||
))
|
||||
config = {
|
||||
'repo': 'local',
|
||||
'hooks': [{
|
||||
'id': 'must-have-signoff',
|
||||
'name': 'Must have "Signed off by:"',
|
||||
'entry': 'grep -q "Signed off by:"',
|
||||
'language': 'system',
|
||||
'stages': ['commit-msg'],
|
||||
}],
|
||||
}
|
||||
write_config(path, config)
|
||||
with cwd(path):
|
||||
cmd_output('git', 'add', '.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue