/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

(jameinel) Bug #660174,
 trap accidental import of pwd on Windows where it doesn't exist. (Alexander
 Belchenko)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2036
2036
        # Whatever the result is, if we don't raise an exception, it's ok.
2037
2037
        osutils.terminal_width()
2038
2038
 
 
2039
 
2039
2040
class TestCreationOps(tests.TestCaseInTempDir):
2040
2041
    _test_needs_features = [features.chown_feature]
2041
2042
 
2071
2072
        self.assertEquals(self.uid, s.st_uid)
2072
2073
        self.assertEquals(self.gid, s.st_gid)
2073
2074
 
 
2075
 
2074
2076
class TestGetuserUnicode(tests.TestCase):
2075
2077
 
2076
2078
    def test_ascii_user(self):
2091
2093
        self.overrideEnv('LOGNAME', u'jrandom\xb6'.encode(ue))
2092
2094
        self.assertEqual(u'jrandom\xb6', osutils.getuser_unicode())
2093
2095
 
 
2096
    def test_no_username_bug_660174(self):
 
2097
        self.requireFeature(features.win32_feature)
 
2098
        for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
 
2099
            self.overrideEnv(name, None)
 
2100
        self.assertEqual(u'UNKNOWN', osutils.getuser_unicode())
 
2101
 
 
2102
 
2094
2103
class TestBackupNames(tests.TestCase):
2095
2104
 
2096
2105
    def setUp(self):