Add new --check-filenames option to check file names as well

A new command line option -f / --check-filenames is implemented which
enables the check of the given file names.
This commit is contained in:
Thorsten Horstmann
2017-10-05 20:53:10 +02:00
parent 6aa79b9ded
commit c7ffd4e50c
2 changed files with 47 additions and 1 deletions

View File

@ -248,6 +248,14 @@ def test_ignore():
assert_equal(cs.main('--skip=ignoredir', d), 1)
def test_check_filename():
"""Test filename check"""
with TemporaryDirectory() as d:
with open(op.join(d, 'abandonned.txt'), 'w') as f:
f.write('.')
assert_equal(cs.main('-f', d), 1)
class TemporaryDirectory(object):
"""Backport for 2.7"""