ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/Active_prgs/HW_enumerator_Checker.py
Revision: 529
Committed: Thu Mar 13 17:24:00 2014 UTC (12 years ago) by nino.borges
Content type: text/x-python
File size: 1490 byte(s)
Log Message:
A program to test the enumerations in the HW db.

File Contents

# User Rev Content
1 nino.borges 529 """
2     HW_enumerator_Checker.py
3    
4     This program will qc the enumeration results from KPMG
5    
6     """
7    
8     import FixBatesRange_func
9    
10     def RunEnumerationCheck(content,exportFile):
11     outputFile = open(exportFile,'w')
12     for line in content:
13    
14     line = line.replace("\n","")
15    
16     begno,endno,enum = line.split("|")
17     enum = enum.split(";")
18     if len(begno) == len(endno):
19     if begno[:2] == endno[:2]:
20     try:
21     myEnum = FixBatesRange_func.EnumerateBates(begno,endno)
22     kpmgEnum = []
23     for y in enum:
24     kpmgEnum.append(y.strip())
25     for i in myEnum:
26     if i in kpmgEnum:
27     pass
28     else:
29     outputFile.write("%s missing fom KPMG, on doc %s\n"%(i,begno))
30     for x in kpmgEnum:
31     if x in myEnum:
32     pass
33     else:
34     outputFile.write("%s missing from MY list, on doc %s\n"%(x,begno))
35     except:
36     outputFile.write("ERR: %s,%s"%(begno,endno))
37     else:
38     outputFile.write("ERR: These two have different prefix: %s,%s\n"%(begno,endno))
39     else:
40     outputFile.write("ERR: These two are totally differrent: %s,%s\n"%(begno,endno))
41     outputFile.close()