File: test_pyflakes.py

package info (click to toggle)
debtags 2.1.5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 960 kB
  • sloc: python: 479; sh: 67; makefile: 34
file content (20 lines) | stat: -rw-r--r-- 540 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3

import os
import subprocess
import unittest

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

    def test_pyflakes_clean(self):
        basedir = os.path.dirname(__file__)
        if not basedir:
            basedir=os.getcwd()
        basedir = os.path.abspath(os.path.join(basedir, ".."))
        self.assertEqual(subprocess.call(["pyflakes3", basedir]), 0)

if __name__ == "__main__":
    import logging
    logging.basicConfig(level=logging.DEBUG)
    unittest.main()