My testing script looks as follows:
import os import sys from unittest import defaultTestLoader as loader, TextTestRunner path_to_my_project = os.path.dirnam
The code is not using unittest.main. You need to check the result using TestResult.wasSuccessful and call sys.exit manually.
import sys .... ret = not runner.run(suite).wasSuccessful() sys.exit(ret)