forked from JCSDA-internal/eva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pycodestyle_run.py
29 lines (18 loc) · 954 Bytes
/
pycodestyle_run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python
# (C) Copyright 2021-2022 United States Government as represented by the Administrator of the
# National Aeronautics and Space Administration. All Rights Reserved.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
import unittest
import pycodestyle
# --------------------------------------------------------------------------------------------------
class TestCodeFormat(unittest.TestCase):
def test_conformance(self):
"""Test that we conform to PEP-8."""
style = pycodestyle.StyleGuide(config_file='pycodestyle.cfg')
result = style.check_files(['.'])
self.assertEqual(result.total_errors, 0, "Found code style errors (and warnings).")
# --------------------------------------------------------------------------------------------------
if __name__ == '__main__':
unittest.main()