use glob to select files for stylecheck

This commit is contained in:
Thor77 2015-07-31 18:59:07 +02:00
parent 7464007b8c
commit 266ff582db
1 changed files with 4 additions and 1 deletions

View File

@ -1,8 +1,11 @@
import pep8
from glob import glob
def test_pep8_comformance():
''' Test that the code conforms to PEP8 '''
pep8style = pep8.StyleGuide(config_file='.pep8')
result = pep8style.check_files(['tsstats.py', 'tests/test_config.py', 'tests/test_general.py', 'tests/test_style.py'])
files = glob('tests/*.py')
files.append('tsstats.py')
result = pep8style.check_files(files)
assert result.total_errors == 0