File: __init__.py

package info (click to toggle)
albatross 1.35-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,328 kB
  • ctags: 1,702
  • sloc: python: 6,964; makefile: 139; sh: 123
file content (33 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (4)
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
#
# Copyright 2001 by Object Craft P/L, Melbourne, Australia.
#
# LICENCE - see LICENCE file distributed with this software for details.
#
#
# Build and test all listed modules.
#
# The module files must have a function "suite" which returns
# an instance of unittest.TestSuite or unittest.TestCase.
#
# $Id: __init__.py 6245 2005-12-16 05:19:32Z andrewm $

import unittest

class AllTestSuite(unittest.TestSuite):
    # add modules with tests here
    all_tests = [
        'recorder',
        'request',
        'set_value',
    ]
    def __init__(self):
        unittest.TestSuite.__init__(self)
        for module_name in self.all_tests:
            module = __import__(module_name, globals())
            self.addTest(module.suite())

def suite():
    return AllTestSuite()

if __name__ == '__main__':
    unittest.main(defaultTest='AllTestSuite')