mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 11:36:54 +00:00
Update tests.
This commit is contained in:
parent
6abdd66053
commit
04101b9c0a
2 changed files with 5 additions and 2 deletions
|
|
@ -86,7 +86,10 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
|||
chars = None if args.chars is None else args.chars.encode('utf-8')
|
||||
return_code = 0
|
||||
for filename in args.filenames:
|
||||
in_md_exts = any([filename for ext in md_exts if filename.endswith(ext)])
|
||||
in_md_exts = any([
|
||||
filename for ext in md_exts
|
||||
if filename.endswith(ext)
|
||||
])
|
||||
md = all_markdown or in_md_exts
|
||||
if _fix_file(filename, md, chars):
|
||||
print('Fixing {}'.format(filename))
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ def test_fixes_markdown_files(tmpdir, ext):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('arg', ('--', 'a.b', 'a/b', ''))
|
||||
@pytest.mark.parametrize('arg', ('--', 'a/b', ''))
|
||||
def test_markdown_linebreak_ext_badopt(arg):
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
main(['--markdown-linebreak-ext', arg])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue