Ulrich
2 years ago
6 changed files with 70 additions and 24 deletions
@ -0,0 +1,50 @@ |
|||
import unittest |
|||
import os |
|||
import inspect |
|||
import shutil |
|||
|
|||
import tools.path_tool |
|||
import basic.program |
|||
import basic.component |
|||
import basic.componentHandling |
|||
import test.constants |
|||
import basic.constants as B |
|||
import test.constants as T |
|||
import basic.componentHandling |
|||
import tools.file_tool |
|||
|
|||
HOME_PATH = test.constants.HOME_PATH |
|||
PYTHON_CMD = "python" |
|||
TEST_FUNCTIONS = ["test_00init"] |
|||
|
|||
PROGRAM_NAME = "clean_workspace" |
|||
|
|||
class MyTestCase(unittest.TestCase): |
|||
mymsg = "--------------------------------------------------------------" |
|||
|
|||
|
|||
def test_00init(self): |
|||
global mymsg |
|||
actfunction = str(inspect.currentframe().f_code.co_name) |
|||
cnttest = 0 |
|||
if actfunction not in TEST_FUNCTIONS: |
|||
return |
|||
# simple job instantiate - without parameter and only simple messaging |
|||
job = basic.program.Job(PROGRAM_NAME) |
|||
print(str(job.__dict__)) |
|||
# self.checkSimpleJob(job) |
|||
sjob = basic.program.SimpleJob(PROGRAM_NAME) |
|||
# print(str(sjob.__dict__)) |
|||
self.checkSimpleComponent(sjob) |
|||
|
|||
def checkSimpleComponent(self, job): |
|||
self.assertIn("conf", job.__dict__) |
|||
self.assertIn("jobid", job.__dict__) |
|||
self.assertIn("program", job.__dict__) |
|||
self.assertIn("start", job.__dict__) |
|||
self.assertIn("configpath", job.conf) |
|||
self.assertIn("paths", job.conf) |
|||
|
|||
|
|||
if __name__ == '__main__': |
|||
unittest.main() |
Loading…
Reference in new issue