aboutsummaryrefslogtreecommitdiff
blob: 3542ca8c6c88ae6f0945dd52de9a9270226b284a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import glob
import unittest

# change it if you don't want get all tests runned
testsglob='tests/test_*.py'

def create_test_suite():
    test_file_strings = glob.glob(testsglob)
    module_strings = ['tests.'+str[6:len(str)-3] for str in test_file_strings]
    suites = [unittest.defaultTestLoader.loadTestsFromName(name) \
              for name in module_strings]
    testSuite = unittest.TestSuite(suites)
    return testSuite