/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: John Arbash Meinel
  • Date: 2007-03-09 21:10:43 UTC
  • mfrom: (2324.2.4 Small fixes)
  • mto: This revision was merged to the branch mainline in revision 2329.
  • Revision ID: john@arbash-meinel.com-20070309211043-ln4hotho1vm2v5ur
(Dmitry Vasiliev) Improvements to osutils functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
        self.assertEqual(baz_path, osutils.dereference_path(foo_baz_path))
242
242
 
243
243
 
 
244
    def test_kind_marker(self):
 
245
        self.assertEqual("", osutils.kind_marker("file"))
 
246
        self.assertEqual("/", osutils.kind_marker(osutils._directory_kind))
 
247
        self.assertEqual("@", osutils.kind_marker("symlink"))
 
248
        self.assertRaises(errors.BzrError, osutils.kind_marker, "unknown")
 
249
 
 
250
 
244
251
class TestSafeUnicode(TestCase):
245
252
 
246
253
    def test_from_ascii_string(self):
704
711
        for dirdetail, dirblock in osutils._walkdirs_utf8('.'):
705
712
            self.assertIsInstance(dirdetail[0], str)
706
713
            if isinstance(dirdetail[1], unicode):
707
 
                dirdetail[1] = dirdetail[1].encode('utf8')
 
714
                dirdetail = (dirdetail[0], dirdetail[1].encode('utf8'))
 
715
                dirblock = [list(info) for info in dirblock]
708
716
                for info in dirblock:
709
717
                    self.assertIsInstance(info[4], unicode)
710
718
                    info[4] = info[4].encode('utf8')