~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-16 18:34:26 UTC
  • mfrom: (5609.46.3 2.3.4-dev)
  • mto: This revision was merged to the branch mainline in revision 5980.
  • Revision ID: v.ladeuil+lp@free.fr-20110616183426-oj818x56zm7yzvb8
Merge 2.3 into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
2052
2052
        # Whatever the result is, if we don't raise an exception, it's ok.
2053
2053
        osutils.terminal_width()
2054
2054
 
 
2055
 
2055
2056
class TestCreationOps(tests.TestCaseInTempDir):
2056
2057
    _test_needs_features = [features.chown_feature]
2057
2058
 
2087
2088
        self.assertEquals(self.uid, s.st_uid)
2088
2089
        self.assertEquals(self.gid, s.st_gid)
2089
2090
 
 
2091
 
2090
2092
class TestGetuserUnicode(tests.TestCase):
2091
2093
 
2092
2094
    def test_ascii_user(self):
2107
2109
        self.overrideEnv('LOGNAME', u'jrandom\xb6'.encode(ue))
2108
2110
        self.assertEqual(u'jrandom\xb6', osutils.getuser_unicode())
2109
2111
 
 
2112
    def test_no_username_bug_660174(self):
 
2113
        self.requireFeature(features.win32_feature)
 
2114
        for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
 
2115
            self.overrideEnv(name, None)
 
2116
        self.assertEqual(u'UNKNOWN', osutils.getuser_unicode())
 
2117
 
 
2118
 
2110
2119
class TestBackupNames(tests.TestCase):
2111
2120
 
2112
2121
    def setUp(self):