import unittest import os import inspect import utils.path_tool import basic.program import basic.constants as B import test.constants import test.testtools import utils.path_const as P import basic.catalog HOME_PATH = test.constants.HOME_PATH OS_SYSTEM = test.constants.OS_SYSTEM # here you can select single testfunction for developping the tests TEST_FUNCTIONS = ["test_key", "test_rejoinPath", "test_rejoinPath", "test_composePath", "test_composePattern", "test_extractPath", "test_extractPattern"] #TEST_FUNCTIONS = [ "test_extractPath"] class MyTestCase(unittest.TestCase): mymsg = "--------------------------------------------------------------" def test_class(self): global mymsg actfunction = str(inspect.currentframe().f_code.co_name) cnttest = 0 if actfunction not in TEST_FUNCTIONS: return job = test.testtools.getJob() catalog = basic.catalog.Catalog.getInstance() self.assertIsNotNone(catalog) MyTestCase.mymsg += "\n----- "+actfunction+" : "+str(cnttest) def test_key(self): global mymsg actfunction = str(inspect.currentframe().f_code.co_name) cnttest = 0 if actfunction not in TEST_FUNCTIONS: return job = test.testtools.getJob() MyTestCase.mymsg += "\n----- "+actfunction+" : "+str(cnttest) def test_zzz(self): print(MyTestCase.mymsg) if __name__ == '__main__': unittest.main()