mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Upgrade add-trailing-comma to 0.4.0
This commit is contained in:
parent
7aeb4fe0f7
commit
be3fbdf94e
9 changed files with 216 additions and 199 deletions
|
|
@ -54,13 +54,15 @@ def makedirs_mock():
|
|||
return mock.Mock(spec=os.makedirs)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('input', 'expected_prefix'), (
|
||||
norm_slash(('.', './')),
|
||||
norm_slash(('foo', 'foo/')),
|
||||
norm_slash(('bar/', 'bar/')),
|
||||
norm_slash(('foo/bar', 'foo/bar/')),
|
||||
norm_slash(('foo/bar/', 'foo/bar/')),
|
||||
))
|
||||
@pytest.mark.parametrize(
|
||||
('input', 'expected_prefix'), (
|
||||
norm_slash(('.', './')),
|
||||
norm_slash(('foo', 'foo/')),
|
||||
norm_slash(('bar/', 'bar/')),
|
||||
norm_slash(('foo/bar', 'foo/bar/')),
|
||||
norm_slash(('foo/bar/', 'foo/bar/')),
|
||||
),
|
||||
)
|
||||
def test_init_normalizes_path_endings(input, expected_prefix):
|
||||
input = input.replace('/', os.sep)
|
||||
expected_prefix = expected_prefix.replace('/', os.sep)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue