~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_i18n.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-04 22:20:49 UTC
  • mto: This revision was merged to the branch mainline in revision 6190.
  • Revision ID: jelmer@samba.org-20111004222049-d9glniyleu0pppzd
Add a load_plugin_translations method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for bzrlib.i18n"""
18
18
 
19
 
from bzrlib import (i18n, 
20
 
                    tests, 
21
 
                    errors, 
22
 
                    workingtree,
23
 
                    )
 
19
from bzrlib import (
 
20
    i18n,
 
21
    tests,
 
22
    errors,
 
23
    workingtree,
 
24
    )
24
25
 
25
26
 
26
27
class ZzzTranslations(object):
152
153
        out = StringIO()
153
154
        help.help("authentication", out)
154
155
        self.assertContainsRe(out.getvalue(), "zz\xe5{{Authentication Settings")
 
156
 
 
157
 
 
158
class LoadPluginTranslations(tests.TestCase):
 
159
 
 
160
    def test_does_not_exist(self):
 
161
        translation = i18n.load_plugin_translations("doesnotexist")
 
162
        self.assertEquals("foo", translation.gettext("foo"))