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

« back to all changes in this revision

Viewing changes to tests/test_pep8.py

  • Committer: Balint Reczey
  • Author(s): Brian Murray
  • Date: 2019-09-11 15:29:50 UTC
  • Revision ID: balint.reczey@canonical.com-20190911152950-azcvu0oborg4t9xq
Tags: 3.192.26
data/apt_check.py: modify wording and output regarding ESM support.
(LP: #1842508)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
    def test_pep8_clean(self):
18
18
        CURDIR = os.path.dirname(os.path.abspath(__file__))
19
 
        py_files = set()
20
19
        for dirpath, dirs, files in os.walk(os.path.join(CURDIR, "..")):
21
20
            for f in files:
22
21
                if os.path.splitext(f)[1] != ".py":
23
22
                    continue
24
23
                if f in IGNORE_FILES:
25
24
                    continue
26
 
                py_files.add(os.path.join(dirpath, f))
27
 
        ret_code = subprocess.call(
28
 
            ["pep8", "--ignore={0}".format(IGNORE_PEP8)] + list(py_files))
29
 
        self.assertEqual(0, ret_code)
 
25
                py_file = os.path.join(dirpath, f)
 
26
                if f == 'test_motd.py':
 
27
                    ret_code = subprocess.call(
 
28
                        ["pep8", "--ignore={0}".format(IGNORE_PEP8 + ", E501"),
 
29
                         py_file])
 
30
                else:
 
31
                    ret_code = subprocess.call(
 
32
                        ["pep8", "--ignore={0}".format(IGNORE_PEP8), py_file])
 
33
                self.assertEqual(0, ret_code)
30
34
 
31
35
 
32
36
if __name__ == "__main__":