import unittest import os from basic.program import Job from basic.componentHandling import ComponentManager import init_testcase HOME_PATH = "/home/ulrich/6_Projekte/Programme/holtz" PYTHON_CMD = "python" class MyTestCase(unittest.TestCase): def xtest_parameter(self): job = Job("unit") args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool"} job.par.setParameterArgs(args) self.assertEqual(job.hascomponente("TestA"), True) self.assertEqual(job.hasTool("TestA"), False) self.assertEqual(job.hasTool("job_tool"), True) self.assertEqual(job.getDebugLevel("file_tool"), 23) self.assertEqual(job.getDebugLevel("job_tool"), 23) args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool", "tsdir": os.path.join(HOME_PATH, "test", "lauf", "V0.1", "startjob", "2021-08-21_18-ß2-01")} job.par.setParameterArgs(args) def xtest_components(self): print("# # # # tetsComponents # # # # #") job = Job.resetInstance("unit") args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool"} job.par.setParameterArgs(args) cm = ComponentManager() cm.createComponents("testb", 0, "") cm.createComponents("testa", 1, "") def test_run(self): # os.system("python /home/ulrich/6_Projekte/Programme/holtz/check_environment.py -a TEST -e ENV01") # os.system("python /home/basic/6_Projekte/Programme/pythonProject/init_testset.py -a TEST -e ENV01 " # "-ts /home/basic/6_Projekte/Programme/holtz/test/lauf/V0.1/implement_2021-08-28_23-50-51 -dt csv -ds implement -dn firstunit") #os.system(PYTHON_CMD+" "+os.path.join(HOME_PATH,"init_testcase.py")+" -a TEST -e ENV01 " # "-tc "+os.path.join(HOME_PATH,"test","lauf","V0.1","TC0001","2021-08-28_23-50-51")+" -dt csv -ds implement -dn TC0001") job = Job("unit") args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool", "tcdir": os.path.join(HOME_PATH,"test","lauf","V0.1","TC0001","2021-08-28_23-50-51")} job.par.setParameterArgs(args) job.setProgram("init_testcase") # os.system("python /home/basic/6_Projekte/Programme/pythonProject/init_testset.py") init_testcase.start(job) job.stopJob(1) if __name__ == '__main__': unittest.main()