dominiontabs/tests/codestyle_tests.py
Sumpfork b70bd37d80 - start using argparse instead of optionparser
- make all code conform to pep8 once more
- add a unit test to check for pep8 compliance
- delete old ez_setup
2016-07-06 15:21:00 -07:00

14 lines
452 B
Python

import unittest
import pycodestyle
import glob
class TestCodeFormat(unittest.TestCase):
def test_conformance(self):
"""Test that we conform to PEP-8."""
style = pycodestyle.StyleGuide(max_line_length=120)
result = style.check_files(glob.glob('*.py') + glob.glob('domdiv/*.py') + glob.glob('tests/*.py'))
self.assertEqual(result.total_errors, 0,
"Found code style errors (and warnings).")