2
# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*-
8
# pycodestyle is overdoing it a bit IMO
9
IGNORE_PYCODESTYLE = "E265, W503"
14
class TestPyCodeStyleClean(unittest.TestCase):
15
""" ensure that the tree is pycodestyle clean """
17
def test_pycodestyle_clean(self):
18
CURDIR = os.path.dirname(os.path.abspath(__file__))
19
for dirpath, dirs, files in os.walk(os.path.join(CURDIR, "..")):
21
if os.path.splitext(f)[1] != ".py":
25
py_file = os.path.join(dirpath, f)
26
if f == 'test_motd.py':
27
ret_code = subprocess.call(
29
"--ignore={0}".format(IGNORE_PYCODESTYLE + ", E501"),
32
ret_code = subprocess.call(
34
"--ignore={0}".format(IGNORE_PYCODESTYLE),
36
self.assertEqual(0, ret_code)
39
if __name__ == "__main__":
41
logging.basicConfig(level=logging.DEBUG)