You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
517 B
16 lines
517 B
import os
|
|
import unittest
|
|
import pycodestyle
|
|
|
|
|
|
class TestCodeFormat(unittest.TestCase):
|
|
|
|
def test_conformance(self):
|
|
"""Test that we conform to PEP-8."""
|
|
project_dir = os.path.dirname(os.path.dirname(__file__))
|
|
codestyle_cfg = os.path.join(project_dir, 'setup.cfg')
|
|
style = pycodestyle.StyleGuide(config_file=codestyle_cfg)
|
|
result = style.check_files('.')
|
|
self.assertEqual(result.total_errors, 0,
|
|
"Found code style errors (and warnings).")
|