1import glob 2import sys 3import unittest 4 5sys.path.insert(0, 'server') 6sys.path.insert(0, 'clients') 7sys.path.insert(0, 'common') 8 9test_file_strings = glob.glob('*/*_test.py') 10module_strings = [str[0:len(str) - 3] for str in test_file_strings] 11for i in range(len(module_strings)): 12 module_strings[i] = module_strings[i].split('/')[-1] 13suites = [unittest.defaultTestLoader.loadTestsFromName(str) 14 for str in module_strings] 15testSuite = unittest.TestSuite(suites) 16text_runner = unittest.TextTestRunner().run(testSuite) 17