From 2ba3c68921306119aafb3962634c17431f833c91 Mon Sep 17 00:00:00 2001 From: Devon Mackay Date: Mon, 9 Jul 2018 12:56:55 -0400 Subject: [PATCH] Add file containing functions used by the test script --- script/include/test_functions.inc.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 script/include/test_functions.inc.sh diff --git a/script/include/test_functions.inc.sh b/script/include/test_functions.inc.sh new file mode 100644 index 00000000..23e231d8 --- /dev/null +++ b/script/include/test_functions.inc.sh @@ -0,0 +1,18 @@ +# test_functions.inc.sh: Functions used by the run_test script + +run_python_lint() { + local python_files="${1}" + run_command "pylint ${python_files}" + return $? +} + +run_python_static_analysis() { + local python_files="${1}" + run_command "bandit -c ./.bandit_config -r ${python_files}" + return $? +} + +run_python_unit_tests() { + run_command "python -m pytest -s" + return $? +}