__init__.py
Go to the documentation of this file.
00001 from os.path import dirname, basename, isfile
00002 import glob
00003 import unittest
00004 # automatically import all files in this module
00005 modules = glob.glob(dirname(__file__)+"/*.py")
00006 __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]
00007 
00008 class RosparamTestSuite(unittest.TestSuite):
00009 
00010         def __init__(self):
00011             super(RosparamTestSuite, self).__init__()
00012 
00013             # Collect test cases
00014             testcases = {}
00015             for test_module in __all__:
00016                 module = __import__("tests."+test_module, fromlist=['*'])
00017                 for name in dir(module):
00018                     obj = getattr(module, name)
00019                     if isinstance(obj, type) and issubclass(obj, unittest.TestCase):
00020                         testcases[name] = unittest.TestLoader().loadTestsFromTestCase(obj)
00021 
00022             # Add testcases
00023             for test_name, test in testcases.items():
00024                 self.addTest(test)


rosparam_handler
Author(s): Claudio Bandera
autogenerated on Sat Jun 8 2019 20:21:53