Browse Source

Run Mypy as normal automated test

This tests all code for good style.

Contributes to issue CURA-5330.
Ghostkeeper 6 years ago
parent
commit
ffd1c5cc09
1 changed files with 7 additions and 1 deletions
  1. 7 1
      cmake/CuraTests.cmake

+ 7 - 1
cmake/CuraTests.cmake

@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Ultimaker B.V.
+# Copyright (c) 2018 Ultimaker B.V.
 # Cura is released under the terms of the LGPLv3 or higher.
 
 enable_testing()
@@ -53,3 +53,9 @@ foreach(_plugin ${_plugins})
         cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}|${CMAKE_SOURCE_DIR}|${URANIUM_DIR}")
     endif()
 endforeach()
+
+#Add code style test.
+add_test(
+    NAME "code-style"
+    COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+)