import unittest

if __name__ == '__main__':
    all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
    unittest.TextTestRunner().run(all_tests)

import sys
import unittest

if __name__ == '__main__':
    all_tests = unittest.TestLoader().discover('./', pattern='*_tests.py')
    ret = unittest.TextTestRunner().run(all_tests)
    sys.exit(not ret.wasSuccessful())

Fix an issue when unit tests always return 0 status.
Fix an issue when unit tests always return 0 status.
