* fix: sort members alphabetically for prettier output

* fix: set locale in unit test interface
This commit is contained in:
Eray Özkural
2005-10-17 11:09:02 +00:00
parent 6ce79c204e
commit 268f0c08ec
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -110,7 +110,7 @@ class LocalText(object):
# fallback to Turkish # fallback to Turkish
return self.locs['tr'] return self.locs['tr']
else: else:
errs.append("Tag '%s' should have at least an English or Turkish version\n" % d[2]) errs.append(_("Tag should have at least an English or Turkish version"))
return '' return ''
# FIXME: use something like the below to return a default # FIXME: use something like the below to return a default
@@ -216,7 +216,9 @@ class autoxml(type):
decoders = [] decoders = []
encoders = [] encoders = []
formatters = [] formatters = []
for var in dict: order = dict.keys()
order.sort()
for var in order:
if var.startswith('t_') or var.startswith('a_'): if var.startswith('t_') or var.startswith('a_'):
name = var[2:] name = var[2:]
if var.startswith('a_'): if var.startswith('a_'):
+2
View File
@@ -13,6 +13,7 @@
import unittest import unittest
import sys import sys
import os import os
import locale
sys.path.append('.') sys.path.append('.')
sys.path.append('..') sys.path.append('..')
@@ -59,6 +60,7 @@ def run_all():
runTestSuite(alltests) runTestSuite(alltests)
if __name__ == "__main__": if __name__ == "__main__":
locale.setlocale(locale.LC_ALL, '')
args = sys.argv args = sys.argv
if len(args) > 1: # run modules given from the command line if len(args) > 1: # run modules given from the command line
tests = sys.argv[1:] tests = sys.argv[1:]