~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_i18n.py

finish test_error_message_translation()

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, tests
 
19
from bzrlib import i18n, tests, errors, workingtree
20
20
 
21
21
 
22
22
class ZzzTranslations(object):
112
112
        self.overrideAttr(i18n, '_translations', ZzzTranslations())
113
113
 
114
114
    def test_error_message_translation(self):
115
 
        import bzrlib
116
 
        #bzrlib.initialize()
117
 
        from bzrlib import workingtree
118
 
        from bzrlib import errors
119
 
        i18n.install()
 
115
        """do errors get translated?"""
120
116
        err = None
121
117
        tree = self.make_branch_and_tree('.')
122
118
        self.overrideAttr(i18n, '_translations', ZzzTranslations())
124
120
            workingtree.WorkingTree.open('./foo')
125
121
        except errors.NotBranchError,e:
126
122
            err = str(e)
127
 
        self.assertEqual("Not a branch: \"/tmp/\".", err)
 
123
        self.assertContainsRe(err, "zz{{Not a branch: .*}}")