Browse Source

Return proper exit value if test failed

Return 1 then.

Contributes to issue CURA-5330.
Ghostkeeper 6 years ago
parent
commit
651f2ffbc9
1 changed files with 3 additions and 8 deletions
  1. 3 8
      run_mypy.py

+ 3 - 8
run_mypy.py

@@ -46,14 +46,9 @@ def main():
         print("------------- Checking module {mod}".format(**locals()))
         result = subprocess.run([sys.executable, mypyModule, "-p", mod])
         if result.returncode != 0:
-            print("""
-    Module {mod} failed checking. :(
-    """.format(**locals()))
-            break
+            print("\nModule {mod} failed checking. :(".format(**locals()))
+            return 1
     else:
-        print("""
-
-    Done checking. All is good.
-    """)
+        print("\n\nDone checking. All is good.")
     return 0
 sys.exit(main())