コード例 #1
0
def test_gettext_unknown():
    s = i18n.gettext('unknown')
    assert isinstance(s, str)
    assert s == 'unknown'
コード例 #2
0
def test_gettext():
    s = i18n.gettext('hello')
    assert isinstance(s, str)
    assert s == 'bonjour'
コード例 #3
0
def test_gettext_params():
    s = i18n.gettext('Holidays', year=2010)
    assert isinstance(s, str)
    assert s == 'Vacances 2010'
コード例 #4
0
def test_gettext_params():
    s = i18n.gettext('Holidays', year=2010)
    assert isinstance(s, str) and (s == 'Vacances 2010')
コード例 #5
0
def test_gettext_unknown():
    i18n.set_locale(i18n.Locale('fr', 'FR'))
    s = i18n.gettext('unknown')
    assert isinstance(s, str) and (s == 'unknown')
コード例 #6
0
ファイル: test_i18n.py プロジェクト: nagareproject/core
 def test_gettext_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.gettext('unknown')
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown')
コード例 #7
0
def test_gettext():
    s = i18n.gettext('hello')
    assert isinstance(s, str) and (s == 'bonjour')
コード例 #8
0
ファイル: test_i18n.py プロジェクト: nagareproject/core
 def test_gettext_params(self):
     s = i18n.gettext('Holidays', year=2010)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'Vacances 2010')
コード例 #9
0
ファイル: test_i18n.py プロジェクト: nagareproject/core
 def test_gettext(self):
     s = i18n.gettext('hello')
     self.assertTrue(isinstance(s, str))
     self.assertEqual(s, 'bonjour')
コード例 #10
0
 def test_gettext_unknown(self):
     i18n.set_locale(i18n.Locale('fr', 'FR'))
     s = i18n.gettext('unknown')
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'unknown')
コード例 #11
0
 def test_gettext_params(self):
     s = i18n.gettext('Holidays', year=2010)
     self.assertIsInstance(s, str)
     self.assertEqual(s, 'Vacances 2010')
コード例 #12
0
 def test_gettext(self):
     s = i18n.gettext('hello')
     self.assertTrue(isinstance(s, str))
     self.assertEqual(s, 'bonjour')