~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
        self.assertEqual(baz_path, osutils.dereference_path(foo_baz_path))
248
248
 
249
249
 
 
250
    def test_kind_marker(self):
 
251
        self.assertEqual("", osutils.kind_marker("file"))
 
252
        self.assertEqual("/", osutils.kind_marker(osutils._directory_kind))
 
253
        self.assertEqual("@", osutils.kind_marker("symlink"))
 
254
        self.assertRaises(errors.BzrError, osutils.kind_marker, "unknown")
 
255
 
 
256
 
250
257
class TestSafeUnicode(TestCase):
251
258
 
252
259
    def test_from_ascii_string(self):
710
717
        for dirdetail, dirblock in osutils._walkdirs_utf8('.'):
711
718
            self.assertIsInstance(dirdetail[0], str)
712
719
            if isinstance(dirdetail[1], unicode):
713
 
                dirdetail[1] = dirdetail[1].encode('utf8')
 
720
                dirdetail = (dirdetail[0], dirdetail[1].encode('utf8'))
 
721
                dirblock = [list(info) for info in dirblock]
714
722
                for info in dirblock:
715
723
                    self.assertIsInstance(info[4], unicode)
716
724
                    info[4] = info[4].encode('utf8')