def test_ngettext_plural_unknown():
    s = i18n.ngettext('unknown1', 'unknown2', 3)
    assert isinstance(s, str)
    assert s == 'unknown2'
def test_ngettext_plural():
    s = i18n.ngettext('horse', 'horses', 3)
    assert isinstance(s, str)
    assert s == 'chevaux'
def test_ngettext_singular_unknown():
    s = i18n.ngettext('unknown1', 'unknown2', 1)
    assert isinstance(s, str)
    assert s == 'unknown1'
Example #4
0
def test_ngettext_singular():
    s = i18n.ngettext('horse', 'horses', 1)
    assert isinstance(s, str) and (s == 'cheval')
def test_ngettext_singular():
    s = i18n.ngettext('horse', 'horses', 1)
    assert isinstance(s, str)
    assert s == 'cheval'
Example #6
0
def test_ngettext_singular_unknown():
    i18n.set_locale(i18n.Locale('fr', 'FR'))
    s = i18n.ngettext('unknown1', 'unknown2', 1)
    assert isinstance(s, str) and (s == 'unknown1')
Example #7
0
def test_ngettext_plural_unknown():
    i18n.set_locale(i18n.Locale('fr_FR'))
    s = i18n.ngettext('unknown1', 'unknown2', 3)
    assert isinstance(s, str) and (s == 'unknown2')
Example #8
0
 def test_ngettext_singular_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown1')
Example #9
0
def test_ngettext_plural():
    s = i18n.ngettext('horse', 'horses', 3)
    assert isinstance(s, str) and (s == 'chevaux')
Example #10
0
 def test_ngettext_singular(self):
     s = i18n.ngettext('horse', 'horses', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'cheval')
Example #11
0
 def test_ngettext_plural(self):
     s = i18n.ngettext('horse', 'horses', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'chevaux')
Example #12
0
 def test_ngettext_plural_unknown(self):
     i18n.set_locale(i18n.Locale('fr_FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown2')
Example #13
0
 def test_ngettext_singular_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown1')
Example #14
0
 def test_ngettext_plural(self):
     s = i18n.ngettext('horse', 'horses', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'chevaux')
Example #15
0
 def test_ngettext_singular(self):
     s = i18n.ngettext('horse', 'horses', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'cheval')
Example #16
0
 def test_ngettext_plural_unknown(self):
     i18n.set_locale(i18n.Locale('fr_FR'))
     s = i18n.ngettext('unknown1', 'unknown2', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown2')