mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-10 05:14:18 +00:00
pre-commit-hooks: python3.6+
This commit is contained in:
parent
551d1a07b3
commit
f5c42a050b
60 changed files with 291 additions and 493 deletions
|
|
@ -1,6 +1,3 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
from pre_commit_hooks.mixed_line_ending import main
|
||||
|
|
@ -86,7 +83,7 @@ def test_no_fix_does_not_modify(tmpdir, capsys):
|
|||
assert ret == 1
|
||||
assert path.read_binary() == contents
|
||||
out, _ = capsys.readouterr()
|
||||
assert out == '{}: mixed line endings\n'.format(path)
|
||||
assert out == f'{path}: mixed line endings\n'
|
||||
|
||||
|
||||
def test_fix_lf(tmpdir, capsys):
|
||||
|
|
@ -97,7 +94,7 @@ def test_fix_lf(tmpdir, capsys):
|
|||
assert ret == 1
|
||||
assert path.read_binary() == b'foo\nbar\nbaz\n'
|
||||
out, _ = capsys.readouterr()
|
||||
assert out == '{}: fixed mixed line endings\n'.format(path)
|
||||
assert out == f'{path}: fixed mixed line endings\n'
|
||||
|
||||
|
||||
def test_fix_crlf(tmpdir):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue