Update tests.

This commit is contained in:
Rémy HUBSCHER 2020-02-05 18:36:50 +01:00
parent 6abdd66053
commit 04101b9c0a
No known key found for this signature in database
GPG key ID: A500E24B95405094
2 changed files with 5 additions and 2 deletions

View file

@ -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))

View file

@ -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])