/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

  • Committer: Martin von Gagern
  • Date: 2010-05-25 11:34:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5273.
  • Revision ID: martin.vgagern@gmx.net-20100525113435-nfut18a2pvresya4
Drop outdated shell completion for zsh.

The new README file in the corresponding directory suggests some
alternatives, first and foremost the one shipped with zsh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
        shape = sorted(os.listdir('.'))
185
185
        self.assertEquals(['A', 'B'], shape)
186
186
 
187
 
    def test_rename_error(self):
188
 
        # We wrap os.rename to make it give an error including the filenames
189
 
        # https://bugs.launchpad.net/bzr/+bug/491763
190
 
        err = self.assertRaises(OSError, osutils.rename,
191
 
            'nonexistent', 'target')
192
 
        self.assertContainsString(str(err), 'nonexistent')
193
 
 
194
187
 
195
188
class TestRandChars(tests.TestCase):
196
189
 
2018
2011
        self.assertEquals(self.path, 'test_file')
2019
2012
        self.assertEquals(self.uid, s.st_uid)
2020
2013
        self.assertEquals(self.gid, s.st_gid)
 
2014
 
 
2015
class TestGetuserUnicode(tests.TestCase):
 
2016
 
 
2017
    def test_ascii_user(self):
 
2018
        osutils.set_or_unset_env('LOGNAME', 'jrandom')
 
2019
        self.assertEqual(u'jrandom', osutils.getuser_unicode())
 
2020
 
 
2021
    def test_unicode_user(self):
 
2022
        ue = osutils.get_user_encoding()
 
2023
        osutils.set_or_unset_env('LOGNAME', u'jrandom\xb6'.encode(ue))
 
2024
        self.assertEqual(u'jrandom\xb6', osutils.getuser_unicode())