debian-forge/test/src/test_pylint.py
David Rheinsberg 39e989245d test: enable pylint warnings
Make pylint complain about warnings, not just errors. There are lots of
useful warnings and we generally do adhere to the coding-styles.
2020-05-28 11:06:05 +02:00

29 lines
898 B
Python

#
# Run `pylint` on all python sources.
#
import subprocess
import unittest
from .. import test
@unittest.skipUnless(test.TestBase.have_test_checkout(), "no test-checkout access")
class TestPylint(test.TestBase, unittest.TestCase):
def test_pylint(self):
#
# Run `pylint` on all python sources. We simply use `find` to locate
# all `*.py` files, and then manually select the reverse-domain named
# modules we have.
#
path = self.locate_test_checkout()
subprocess.run(f"find {path} -type f -name '*.py' | xargs pylint",
shell=True, check=True)
subprocess.run("pylint"
+ f" {path}/assemblers/*"
+ f" {path}/runners/*"
+ f" {path}/sources/*"
+ f" {path}/stages/*",
shell=True, check=True)