Adding upstream version 2.9.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e8d3ba475e
commit
5f54aad01b
32 changed files with 252 additions and 75 deletions
|
@ -2,24 +2,9 @@ import pytest
|
|||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit.clientlib import InvalidConfigError
|
||||
from pre_commit.commands.migrate_config import _indent
|
||||
from pre_commit.commands.migrate_config import migrate_config
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
('s', 'expected'),
|
||||
(
|
||||
('', ''),
|
||||
('a', ' a'),
|
||||
('foo\nbar', ' foo\n bar'),
|
||||
('foo\n\nbar\n', ' foo\n\n bar\n'),
|
||||
('\n\n\n', '\n\n\n'),
|
||||
),
|
||||
)
|
||||
def test_indent(s, expected):
|
||||
assert _indent(s) == expected
|
||||
|
||||
|
||||
def test_migrate_config_normal_format(tmpdir, capsys):
|
||||
cfg = tmpdir.join(C.CONFIG_FILE)
|
||||
cfg.write(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue