~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Martin Pool
  • Date: 2010-09-14 04:13:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5423.
  • Revision ID: mbp@sourcefrog.net-20100914041348-sf8atjm5smvmeprs
Delete deprecated _BaseProgressBar

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import os
22
22
import re
23
23
import socket
 
24
import stat
24
25
import sys
25
26
import time
26
27
 
2075
2076
 
2076
2077
    def test_unicode_user(self):
2077
2078
        ue = osutils.get_user_encoding()
2078
 
        uni_val, env_val = tests.probe_unicode_in_user_encoding()
2079
 
        if uni_val is None:
2080
 
            raise tests.TestSkipped(
2081
 
                'Cannot find a unicode character that works in encoding %s'
2082
 
                % (osutils.get_user_encoding(),))
2083
 
        uni_username = u'jrandom' + uni_val
2084
 
        encoded_username = uni_username.encode(ue)
2085
 
        osutils.set_or_unset_env('LOGNAME', encoded_username)
2086
 
        self.assertEqual(uni_username, osutils.getuser_unicode())
 
2079
        osutils.set_or_unset_env('LOGNAME', u'jrandom\xb6'.encode(ue))
 
2080
        self.assertEqual(u'jrandom\xb6', osutils.getuser_unicode())