File: test_pyflakes.py

package info (click to toggle)
software-properties 0.111-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,944 kB
  • sloc: python: 8,238; makefile: 19; sh: 18; xml: 10
file content (26 lines) | stat: -rwxr-xr-x 744 bytes parent folder | download | duplicates (2)
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
import glob
import os
import subprocess
import unittest

@unittest.skip("It's not clean")
class TestPyflakesClean(unittest.TestCase):
    """ ensure that the tree is pyflakes clean """

    BLOCKLIST = ("/softwareproperties/qt",
                )

    def setUp(self):
        self.paths = []
        basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
        for dirpath, dirs, files in os.walk(basedir):
            if any([dirpath.endswith(p) for p in self.BLOCKLIST]):
                continue
            self.paths.extend(glob.glob(dirpath+"/*.py"))

    def test_pyflakes3_clean(self):
        self.assertEqual(subprocess.check_call(['pyflakes3'] +  self.paths), 0)


if __name__ == "__main__":
    unittest.main()