run_all_tests.py 792 字节
Newer Older
1 2 3 4 5 6 7 8 9
#!/usr/bin/python
#-*-coding:utf-8-*-
"""Run all tests
"""

import unittest
import test_loader
import test_operator
import test_roidb_source
10
import test_iterator_source
11 12 13 14 15 16 17 18 19 20
import test_transformer
import test_reader

if __name__ == '__main__':
    alltests = unittest.TestSuite([
        unittest.TestLoader().loadTestsFromTestCase(t) \
        for t in [
            test_loader.TestLoader,
            test_operator.TestBase,
            test_roidb_source.TestRoiDbSource,
21
            test_iterator_source.TestIteratorSource,
22 23 24 25 26 27 28 29 30 31 32
            test_transformer.TestTransformer,
            test_reader.TestReader,
        ]
    ])

    was_succ = unittest\
                .TextTestRunner(verbosity=2)\
                .run(alltests)\
                .wasSuccessful()

    exit(0 if was_succ else 1)