diff --git a/test/test_compare.py b/test/test_compare.py index 77e6c7e..4c77e6d 100644 --- a/test/test_compare.py +++ b/test/test_compare.py @@ -184,7 +184,7 @@ class MyTestCase(unittest.TestCase): comp.conf = conf matching = utils.match_tool.Matching(comp) matching.htmltext = "" - matching.setData(tdata, utils.match_tool.MATCH_POSTCOND) + matching.setData(tdata, M.MATCH_POSTCOND) text = utils.match_tool.matchTree(matching) print("\n-------------\n") print(text) diff --git a/utils/data_const.py b/utils/data_const.py index b502c26..b5350f6 100644 --- a/utils/data_const.py +++ b/utils/data_const.py @@ -26,3 +26,9 @@ CSV_NODETYPE_KEYS = "_keys" ATTR_SRC_TYPE = "tdtyp" ATTR_SRC_DATA = "tdsrc" ATTR_SRC_NAME = "tdname" + +DEFAULT_DB_PARTITION = "n" +""" attribute if table is partitioned - partitions are parametrized """ +DEFAULT_DB_CONN_JAR = "n" +""" attribute for connection-jar-file instead of connection by ip, port """ + diff --git a/utils/file_tool.py b/utils/file_tool.py index d002b89..9850940 100644 --- a/utils/file_tool.py +++ b/utils/file_tool.py @@ -13,6 +13,7 @@ import yaml import basic.message import basic.program +import utils.data_const as D from pprint import pp import utils.tdata_tool @@ -170,7 +171,7 @@ def readFileDict(path, msg): if not os.path.exists(path): return doc enc = detectFileEncode(path, msg) - if D.DFILE_TYPE_YML in path[-5:]: + if D.DFILE_TYPE_YML in path[-4:]: with open(path, 'r', encoding=enc) as file: doc = yaml.full_load(file) file.close() diff --git a/utils/match_tool.py b/utils/match_tool.py index f9322f1..eabb96d 100644 --- a/utils/match_tool.py +++ b/utils/match_tool.py @@ -93,13 +93,13 @@ class Matching(): job.debug(verify, "getDiffHeader ") htmltxt = "" htmltxt += "" - htmltxt += ""+M.MARCH[matching.matchtype]["title"]+"" + htmltxt += ""+M.MATCH[matching.matchtype]["title"]+"" htmltxt += utils.css_tool.getInternalStyle("diffFiles") htmltxt += "" htmltxt += "" - htmltxt += "

"+M.MARCH[matching.matchtype]["title"]+"

" - htmltxt += "

"+M.MARCH[M.MARCH[matching.matchtype]["A"]]["long"]+": "+matching.matchfiles["A"]+"

" - htmltxt += "

"+M.MARCH[M.MARCH[matching.matchtype]["B"]]["long"]+": "+matching.matchfiles["B"]+"


" + htmltxt += "

"+M.MATCH[matching.matchtype]["title"]+"

" + htmltxt += "

"+M.MATCH[M.MATCH[matching.matchtype]["A"]]["long"]+": "+matching.matchfiles["A"]+"

" + htmltxt += "

"+M.MATCH[M.MATCH[matching.matchtype]["B"]]["long"]+": "+matching.matchfiles["B"]+"


" matching.htmltext = htmltxt def setDiffFooter(self): @@ -276,7 +276,7 @@ def getEvaluation(matching, type, acceptance, sideA, sideB): result = "test" if match == "99": return ["MATCH", "novalue", "novalue", "novalue", "novalue"] if acceptance == "ignore": result = "ignore" - if (matching.matchtype == M.MARCH_POSTCOND) and (result == "test"): + if (matching.matchtype == M.MATCH_POSTCOND) and (result == "test"): result = "hard" classA = "diffA" classB = "diffB" @@ -392,7 +392,7 @@ def markRow(matching, header, row, side): cssClass = res[2] text += ""+val+"" text = "" \ - + M.MARCH[M.MARCH[matching.matchtype][side]]["short"] + ""+text+"" + + M.MATCH[M.MATCH[matching.matchtype][side]]["short"] + ""+text+"" matching.difftext += text return text @@ -447,8 +447,8 @@ def compareRow(matching, header, rA, rB): matching.setCssClass("result1") if allident: return ""+textA+"" - text = ""+M.MARCH[M.MARCH[matching.matchtype]["A"]]["short"]+""+textA+"" - text += ""+M.MARCH[matching.matchtype]["shortB"]+""+textB+"" + text = ""+M.MATCH[M.MATCH[matching.matchtype]["A"]]["short"]+""+textA+"" + text += ""+M.MATCH[matching.matchtype]["shortB"]+""+textB+"" matching.difftext += text return text