annotate babel/tests/plural.py @ 576:e77dd06c40ef trunk

fix formatting of fraction in format_decimal() if the input value is a float with more than 7 significant digits (#183)
author fschwarz
date Sat, 28 Jul 2012 22:26:02 +0000
parents ca203b2af83c
children
rev   line source
411
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
1 # -*- coding: utf-8 -*-
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
2 #
530
ca203b2af83c Update the copyright line.
jruigrok
parents: 411
diff changeset
3 # Copyright (C) 2008-2011 Edgewall Software
411
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
4 # All rights reserved.
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
5 #
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
6 # This software is licensed as described in the file COPYING, which
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
7 # you should have received as part of this distribution. The terms
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
8 # are also available at http://babel.edgewall.org/wiki/License.
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
9 #
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
10 # This software consists of voluntary contributions made by many
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
11 # individuals. For the exact contribution history, see the revision
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
12 # history and logs, available at http://babel.edgewall.org/log/.
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
13
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
14 import doctest
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
15 import unittest
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
16
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
17 from babel import plural
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
18
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
19
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
20 def suite():
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
21 suite = unittest.TestSuite()
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
22 suite.addTest(doctest.DocTestSuite(plural))
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
23 return suite
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
24
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
25
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
26 if __name__ == '__main__':
49859ecea64a More plural module cleanup and fixes.
cmlenz
parents:
diff changeset
27 unittest.main(defaultTest='suite')
Copyright (C) 2012-2017 Edgewall Software