~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_sprout.py

  • Committer: Vincent Ladeuil
  • Date: 2009-04-17 16:08:45 UTC
  • mto: (4331.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4332.
  • Revision ID: v.ladeuil+lp@free.fr-20090417160845-2ti82rp1nc7kfoj4
NEWS entry and final cleanup before submission.

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
 
148
148
        revision = tree.commit('added a link to a Unicode target')
149
149
        tree.bzrdir.sprout('dest')
150
 
 
151
 
        def read_link(link):
152
 
            # The only reliable way to get the link target for python2.[456]
153
 
            # other aternative implementations either fails to reliably return
154
 
            # a unicode string or fails to encode the received unicode string
155
 
            link = link.encode(osutils._fs_enc)
156
 
            target = os.readlink(link)
157
 
            target = target.decode(osutils._fs_enc)
158
 
            return target
159
 
 
160
 
        self.assertEqual(target, read_link('dest/' + link_name))
 
150
        self.assertEqual(target, osutils.readlink('dest/' + link_name))
161
151
        tree.lock_read()
162
152
        self.addCleanup(tree.unlock)
163
153
        # Check that the symlink target is safely round-tripped in the trees.