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
|
|
@ -11,10 +11,12 @@ from pre_commit.color import InvalidColorSetting
|
|||
from pre_commit.color import use_color
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('in_text', 'in_color', 'in_use_color', 'expected'), (
|
||||
('foo', GREEN, True, '{}foo\033[0m'.format(GREEN)),
|
||||
('foo', GREEN, False, 'foo'),
|
||||
))
|
||||
@pytest.mark.parametrize(
|
||||
('in_text', 'in_color', 'in_use_color', 'expected'), (
|
||||
('foo', GREEN, True, '{}foo\033[0m'.format(GREEN)),
|
||||
('foo', GREEN, False, 'foo'),
|
||||
),
|
||||
)
|
||||
def test_format_color(in_text, in_color, in_use_color, expected):
|
||||
ret = format_color(in_text, in_color, in_use_color)
|
||||
assert ret == expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue