Skip to content

Commit

Permalink
update locale test
Browse files Browse the repository at this point in the history
  • Loading branch information
crocsg committed Nov 2, 2024
1 parent a70492d commit 7a664d0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pytest/checklocale.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def load_locale_files(files):
return locales
def test_locales (files):
errlist = []
stat = {}
for file in files:
print("checking file :",file['file'])
for testfile in files:
Expand All @@ -29,7 +30,11 @@ def test_locales (files):
for key in file['data'].keys():
if (key not in testfile['data']):
errlist.append("{0} : key {1} not in :{2}".format (file['file'],key,testfile['file']))
return errlist
if testfile['file'] in stat:
stat[testfile['file']] += 1
else:
stat[testfile['file']] = 1
return stat

def main ():
# get locale data files
Expand All @@ -46,8 +51,8 @@ def main ():
errlist = test_locales(locales)
if (len(errlist) > 0):
for err in errlist:
print (err)
print("errors found :", len(errlist))
print (err, errlist[err], "errors")

return (1)
else:
print("no errors found")
Expand Down

0 comments on commit 7a664d0

Please sign in to comment.