~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to tests/test_pycodestyle.py

  • Committer: dann frazier
  • Date: 2020-02-04 02:25:51 UTC
  • Revision ID: dannf@ubuntu.com-20200204022551-tua3t1n2jydnb0b6
Search and replace pep8 w/ pycodestyle after rename.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
import subprocess
6
6
import unittest
7
7
 
8
 
# pep8 is overdoing it a bit IMO
9
 
IGNORE_PEP8 = "E265, W503"
 
8
# pycodestyle is overdoing it a bit IMO
 
9
IGNORE_PYCODESTYLE = "E265, W503"
10
10
IGNORE_FILES = (
11
11
)
12
12
 
13
13
 
14
 
class TestPep8Clean(unittest.TestCase):
15
 
    """ ensure that the tree is pep8 clean """
 
14
class TestPyCodeStyleClean(unittest.TestCase):
 
15
    """ ensure that the tree is pycodestyle clean """
16
16
 
17
 
    def test_pep8_clean(self):
 
17
    def test_pycodestyle_clean(self):
18
18
        CURDIR = os.path.dirname(os.path.abspath(__file__))
19
19
        for dirpath, dirs, files in os.walk(os.path.join(CURDIR, "..")):
20
20
            for f in files:
26
26
                if f == 'test_motd.py':
27
27
                    ret_code = subprocess.call(
28
28
                        ["pycodestyle",
29
 
                         "--ignore={0}".format(IGNORE_PEP8 + ", E501"),
 
29
                         "--ignore={0}".format(IGNORE_PYCODESTYLE + ", E501"),
30
30
                         py_file])
31
31
                else:
32
32
                    ret_code = subprocess.call(
33
33
                        ["pycodestyle",
34
 
                         "--ignore={0}".format(IGNORE_PEP8),
 
34
                         "--ignore={0}".format(IGNORE_PYCODESTYLE),
35
35
                         py_file])
36
36
                self.assertEqual(0, ret_code)
37
37