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')