aboutsummaryrefslogtreecommitdiff
blob: 0d52de7b9d30d1bc7c98b114401c76e1359132f3 (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_p*.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