2015-07-17 09:36:25 -04:00
|
|
|
import pep8
|
2015-09-04 17:03:26 -04:00
|
|
|
from pyflakes.api import checkPath
|
2015-07-31 12:59:07 -04:00
|
|
|
from glob import glob
|
2015-07-17 09:36:25 -04:00
|
|
|
|
|
|
|
|
|
|
|
def test_pep8_comformance():
|
|
|
|
''' Test that the code conforms to PEP8 '''
|
|
|
|
pep8style = pep8.StyleGuide(config_file='.pep8')
|
2015-07-31 12:59:07 -04:00
|
|
|
files = glob('tests/*.py')
|
|
|
|
files.append('tsstats.py')
|
|
|
|
result = pep8style.check_files(files)
|
2015-07-17 09:36:25 -04:00
|
|
|
assert result.total_errors == 0
|
2015-09-04 17:03:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
def test_pyflakes():
|
|
|
|
''' Test that at least tsstats.py conforms to PyFlakes '''
|
|
|
|
result = checkPath('tsstats.py')
|
|
|
|
assert result == 0
|