# HG changeset patch # User jruigrok # Date 1266587125 0 # Node ID 99f5a4551ba85be1e21272a9c2f0ff4f24d1ed3c # Parent 3474ffd631e6cf9067072778c0aca5a8af9fa7bd Put the square brackets test after all the normal plural tests. It's more logical. diff --git a/babel/messages/tests/pofile.py b/babel/messages/tests/pofile.py --- 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):