File: test_pyflakes.py

package info (click to toggle)
command-not-found 20.10.1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 364 kB
  • sloc: python: 995; sh: 43; makefile: 9
file content (20 lines) | stat: -rwxr-xr-x 557 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import glob
import os
import subprocess
import unittest

class TestPyflakesClean(unittest.TestCase):
    """ ensure that the tree is pyflakes clean """

    def setUp(self):
        self.paths = []
        basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
        for dirpath, dirs, files in os.walk(basedir):
            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()