~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils_encodings.py

  • Committer: John Arbash Meinel
  • Date: 2008-09-26 22:14:42 UTC
  • mto: This revision was merged to the branch mainline in revision 3747.
  • Revision ID: john@arbash-meinel.com-20080926221442-3r67j99sr9rwe9w0
Make message optional, don't check the memory flag directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib.tests import (
30
30
        StringIOWrapper,
31
31
        TestCase, 
32
 
        TestSkipped,
33
32
        )
34
33
 
35
34
 
198
197
                          ' Continuing with ascii encoding.\n',
199
198
                          sys.stderr.getvalue())
200
199
 
 
200
    def test_user_empty(self):
 
201
        """Running bzr from a vim script gives '' for a preferred locale"""
 
202
        def f():
 
203
            return ''
 
204
 
 
205
        locale.getpreferredencoding = f
 
206
        self.assertEquals('ascii', osutils.get_user_encoding(use_cache=False))
 
207
        self.assertEquals('', sys.stderr.getvalue())
 
208
 
201
209
    def test_user_locale_error(self):
202
210
        def f():
203
211
            raise locale.Error, 'unsupported locale'