Mercurial > babel > mirror
changeset 444:a4eb4ea8d6f9 trunk
Put the square brackets test after all the normal plural tests. It's more
logical.
author | jruigrok |
---|---|
date | Fri, 19 Feb 2010 13:45:25 +0000 |
parents | 53fe6880791a |
children | 766ddd5161c8 |
files | babel/messages/tests/pofile.py |
diffstat | 1 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/messages/tests/pofile.py +++ b/babel/messages/tests/pofile.py @@ -211,17 +211,6 @@ message = catalog['foo'] self.assertEqual(2, len(message.string)) - def test_plural_with_square_brackets(self): - buf = StringIO(r'''msgid "foo" -msgid_plural "foo" -msgstr[0] "Voh [text]" -msgstr[1] "Vohs [text]"''') - catalog = pofile.read_po(buf, locale='nb_NO') - self.assertEqual(1, len(catalog)) - self.assertEqual(2, catalog.num_plurals) - message = catalog['foo'] - self.assertEqual(2, len(message.string)) - def test_more_than_two_plural_forms(self): buf = StringIO(r'''msgid "foo" msgid_plural "foo" @@ -235,6 +224,17 @@ self.assertEqual(3, len(message.string)) self.assertEqual('', message.string[2]) + def test_plural_with_square_brackets(self): + buf = StringIO(r'''msgid "foo" +msgid_plural "foo" +msgstr[0] "Voh [text]" +msgstr[1] "Vohs [text]"''') + catalog = pofile.read_po(buf, locale='nb_NO') + self.assertEqual(1, len(catalog)) + self.assertEqual(2, catalog.num_plurals) + message = catalog['foo'] + self.assertEqual(2, len(message.string)) + class WritePoTestCase(unittest.TestCase):