loader unittest TestLoader suite unittest TestSuite for path in test_l

1
2
3
4
5
6
7
8
loader = unittest.TestLoader()
suite = unittest.TestSuite()
for path in test_list:
mod_suite = loader.loadTestsFromName(path)
for some_suite in mod_suite:
for test in some_suite:
if not hasattr(test, '_backend') or test._backend in GLOBAL['backends']:
suite.addTest(test)