summaryrefslogtreecommitdiff
path: root/test/orm/alltests.py
blob: dd2bd8446322004cea79e94c79feee49fd6e9cca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import testbase
import unittest

import inheritance.alltests as inheritance
import sharding.alltests as sharding

def suite():
    modules_to_test = (
    'orm.attributes',
        'orm.query',
        'orm.lazy_relations',
        'orm.eager_relations',
        'orm.mapper',
        'orm.expire',
        'orm.selectable',
        'orm.collection',
        'orm.generative',
        'orm.lazytest1',
        'orm.assorted_eager',

        'orm.naturalpks',
        'orm.sessioncontext', 
        'orm.unitofwork',
        'orm.session',
        'orm.cascade',
        'orm.relationships',
        'orm.association',
        'orm.merge',
        'orm.pickled',
        'orm.memusage',
        
        'orm.cycles',

        'orm.entity',
        'orm.compile',
        'orm.manytomany',
        'orm.onetoone',
        'orm.dynamic',
        )
    alltests = unittest.TestSuite()
    for name in modules_to_test:
        mod = __import__(name)
        for token in name.split('.')[1:]:
            mod = getattr(mod, token)
        alltests.addTest(unittest.findTestCases(mod, suiteClass=None))
    alltests.addTest(inheritance.suite())
    alltests.addTest(sharding.suite())
    return alltests


if __name__ == '__main__':
    testbase.main(suite())