Add mypy and add typechecking step to script/test

Only check atst/domain/csp/cloud.py for now
This commit is contained in:
richard-dds
2019-10-24 14:44:53 -04:00
parent 76ab44ca69
commit c66b1ef2f9
7 changed files with 235 additions and 174 deletions

View File

@@ -35,6 +35,9 @@ if [ "${RUN_PYTHON_TESTS}" = "true" ]; then
output_divider "Perform static analysis on Python files"
run_python_static_analysis "${PYTHON_FILES}"
((python_test_status+=$?))
output_divider "Perform type checking on Python files"
run_python_typecheck
((python_test_status+=$?))
output_divider "Run Python unit test suite"
run_python_unit_tests "${PYTHON_FILES}"
((python_test_status+=$?))

View File

@@ -7,6 +7,11 @@ run_python_lint() {
return $?
}
run_python_typecheck() {
run_command "mypy --ignore-missing-imports --follow-imports=skip atst/domain/csp/cloud.py"
return $?
}
run_python_static_analysis() {
local python_files="${1}"