def unit_test(): ARGVS.fi = os.path.join(PATH_FILE, 'ARCFLASH.OLR') run() sres = "OLR file: " + os.path.basename(ARGVS.fi) + "\n" sres += "Template file: " + os.path.basename(ARGVS.ft) + "\n" sres += AppUtils.read_File_text_2(ARGVS.fo, 5) # AppUtils.deleteFile(ARGVS.fo) return AppUtils.unit_test_compare(PATH_FILE, PY_FILE, sres)
def unit_test(): ARGVS.fi = os.path.join(PATH_FILE, "BusFlt.OLR") ARGVS.pk = ["[BUS] 6 'NEVADA' 132 kV"] sres = "OLR file: " + os.path.basename(ARGVS.fi) + "\n" run() sres += AppUtils.read_File_text_2(ARGVS.fo, 1) # AppUtils.deleteFile(ARGVS.fo) return AppUtils.unit_test_compare(PATH_FILE, PY_FILE, sres)
def unit_test(): ARGVS.fi = os.path.join(PATH_FILE, "NETWORKUTIL.OLR") ARGVS.pk = ["[BUS] 10 'NEW HAMPSHR' 33 kV", "[BUS] 28 'ARIZONA' 132 kV"] # run() sres = "OLR file: " + os.path.basename(ARGVS.fi) + "\n" sres += AppUtils.read_File_text_2(ARGVS.fo, 4) # AppUtils.deleteFile(ARGVS.fo) return AppUtils.unit_test_compare(PATH_FILE, PY_FILE, sres)
def unit_test(): ARGVS.fi = os.path.join(PATH_FILE, "LINETERM.OLR") ARGVS.pk = ["[RELAYGROUP] 5 'FIELDALE' 132 kV-'BUS3' 132 kV 1 L"] sres = 'OLR file: ' + os.path.basename(ARGVS.fi) + '\n' run() sres += AppUtils.read_File_text_2(ARGVS.fo, 4) ARGVS.pk = ["[RELAYGROUP] 2 'CLAYTOR' 132 kV-6 'NEVADA' 132 kV 1 L"] run() sres += '\n' sres += AppUtils.read_File_text_2(ARGVS.fo, 4) AppUtils.deleteFile(ARGVS.fo) return AppUtils.unit_test_compare(PATH_FILE, PY_FILE, sres)
def unit_test(): ARGVS.fi = os.path.join(PATH_FILE, "XFMRConn.OLR") sres = "OLR file: " + os.path.basename(ARGVS.fi) + "\n" sres += run() # s1 = ARGVS.fi ARGVS.fi = ARGVS.fo sres += "\nRe-check\n" sres += "OLR file: " + os.path.basename(ARGVS.fi) + "\n" sres += run() # OlxAPI.CloseDataFile() AppUtils.deleteFile(ARGVS.fi) return AppUtils.unit_test_compare(PATH_FILE, PY_FILE, sres)