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'
示例#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'
示例#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')
示例#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')
示例#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')
示例#9
0
def test_ngettext_plural():
    s = i18n.ngettext('horse', 'horses', 3)
    assert isinstance(s, str) and (s == 'chevaux')
示例#10
0
 def test_ngettext_singular(self):
     s = i18n.ngettext('horse', 'horses', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'cheval')
示例#11
0
 def test_ngettext_plural(self):
     s = i18n.ngettext('horse', 'horses', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'chevaux')
示例#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')
示例#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')
示例#14
0
 def test_ngettext_plural(self):
     s = i18n.ngettext('horse', 'horses', 3)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'chevaux')
示例#15
0
 def test_ngettext_singular(self):
     s = i18n.ngettext('horse', 'horses', 1)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'cheval')
示例#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')