|
@@ -250,3 +250,20 @@ class TestCheckPackage(unittest.TestCase):
|
|
|
self.assert_file_was_processed(m)
|
|
|
self.assert_warnings_generated_for_file(m)
|
|
|
self.assertIn("{}:0: run 'shellcheck' and fix the warnings".format(abs_file), w)
|
|
|
+
|
|
|
+ # python scripts are tested using flake8
|
|
|
+ rel_file = "utils/x-python"
|
|
|
+ abs_path = infra.filepath("tests/utils/br2-external")
|
|
|
+ abs_file = os.path.join(abs_path, rel_file)
|
|
|
+
|
|
|
+ w, m = call_script(["check-package", "-vvv", "-b", rel_file],
|
|
|
+ self.WITH_UTILS_IN_PATH, abs_path)
|
|
|
+ self.assert_file_was_processed(m)
|
|
|
+ self.assert_warnings_generated_for_file(m)
|
|
|
+ self.assertIn("{}:0: run 'flake8' and fix the warnings".format(rel_file), w)
|
|
|
+
|
|
|
+ w, m = call_script(["check-package", "-b", abs_file],
|
|
|
+ self.WITH_UTILS_IN_PATH, infra.basepath())
|
|
|
+ self.assert_file_was_processed(m)
|
|
|
+ self.assert_warnings_generated_for_file(m)
|
|
|
+ self.assertIn("{}:0: run 'flake8' and fix the warnings".format(abs_file), w)
|