Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
944 B

3 years ago
import unittest
import utils.config_tool as t
from ulrich.program import Job
class MyTestCase(unittest.TestCase):
def test_something(self):
job = Job("unit")
args = {"application": "TEST", "application": "ENV01", "modus": "unit", "loglevel": "debug", "tool": "config_tool",
"modus": "unit"}
job.par.setParameterArgs(args)
r = t.getConfigPath("tool", "path")
print (r)
self.assertEqual(r, "/home/ulrich/6_Projekte/Programme/pythonProject/utils/configs/path.yml")
r = t.getConfigPath("comp", "TestA2")
print (r)
self.assertEqual(r, None)
r = t.getConfigPath("comp", "testA2")
print (r)
r = t.getConfig("tool", "path")
print (r)
#r = t.getConfig("comp", "testA2")
print("pattern " + r["pattern"]["log"])
print("pattern " + r["pattern"]["precond"])
if __name__ == '__main__':
unittest.main()