annotate babel/tests/util.py @ 536:9facabfe91d0

catch exception if environment contains an invalid locale setting (fixes #200)
author fschwarz
date Fri, 11 Mar 2011 16:20:57 +0000
parents e93f68837913
children
rev   line source
3
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
1 # -*- coding: utf-8 -*-
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
2 #
532
e93f68837913 Update the copyright line.
jruigrok
parents: 14
diff changeset
3 # Copyright (C) 2007-2011 Edgewall Software
3
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
4 # All rights reserved.
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
5 #
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
6 # This software is licensed as described in the file COPYING, which
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
7 # you should have received as part of this distribution. The terms
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
8 # are also available at http://babel.edgewall.org/wiki/License.
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
9 #
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
10 # This software consists of voluntary contributions made by many
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
11 # individuals. For the exact contribution history, see the revision
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
12 # history and logs, available at http://babel.edgewall.org/log/.
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
13
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
14 import doctest
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
15 import unittest
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
16
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
17 from babel import util
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
18
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
19 def suite():
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
20 suite = unittest.TestSuite()
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
21 suite.addTest(doctest.DocTestSuite(util))
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
22 return suite
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
23
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
24 if __name__ == '__main__':
e9eaddab598e Import of initial code base.
cmlenz
parents:
diff changeset
25 unittest.main(defaultTest='suite')
Copyright (C) 2012-2017 Edgewall Software