Unit test script returns exit code = 0 even if tests fail
Unit test script returns exit code = 0 even if tests fail Question: My testing script looks as follows: import os import sys from unittest import defaultTestLoader as loader, TextTestRunner path_to_my_project = os.path.dirname(os.path.abspath(__file__)) + ‘/../’ sys.path.insert(0, path_to_my_project) suite = loader.discover(‘my_project’) runner = TextTestRunner() runner.run(suite) If I run this script, the output is: $ python3 runtest.py …