mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
test info
This commit is contained in:
@@ -17,11 +17,18 @@ class TestGettext(TestCase):
|
||||
def test_get_localedir(self):
|
||||
_localedir = _sw_core_utils.gnc_path_get_localedir()
|
||||
|
||||
#def test_translation(self):
|
||||
# import inspect
|
||||
# import locale
|
||||
# raise MyException({'_(""): ':_(""), '_sw_core_utils.gnc_path_get_localedir(): ':_sw_core_utils.gnc_path_get_localedir(),'_.__doc__': _.__doc__, 'inspect.getsource(_): ': inspect.getsource(_), '_("Welcome to GnuCash")':_("Welcome to GnuCash"), 'locale.getlocale(): ': locale.getlocale()})
|
||||
# self.assertTrue("Project-Id-Version: GnuCash" in _(""))
|
||||
def test_translation(self):
|
||||
import inspect
|
||||
import locale
|
||||
import gettext
|
||||
_localedir = _sw_core_utils.gnc_path_get_localedir()
|
||||
|
||||
t = gettext.translation(_sw_core_utils.GETTEXT_PACKAGE, _localedir)
|
||||
|
||||
self.assertIn("project-id-version", t.info())
|
||||
self.assertIn("GnuCash", t.info()["project-id-version"])
|
||||
raise MyException({'_(""): ':_(""), '_sw_core_utils.gnc_path_get_localedir(): ':_sw_core_utils.gnc_path_get_localedir(),'_.__doc__': _.__doc__, 'inspect.getsource(_): ': inspect.getsource(_), '_("Welcome to GnuCash")':_("Welcome to GnuCash"), 'locale.getlocale(): ': locale.getlocale(), 't:': t, 't.gettext(""): ': t.gettext(""), 't.info(): ': t.info()})
|
||||
self.assertTrue("Project-Id-Version: GnuCash" in _(""))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user