~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

  • Committer: Vincent Ladeuil
  • Date: 2007-09-24 09:40:01 UTC
  • mto: (2851.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2852.
  • Revision ID: v.ladeuil+lp@free.fr-20070924094001-k8z6tlxnlcimvg5a
Fix 141382 by comparing real paths.

* bzrlib/tests/test_sftp_transport.py:
(SFTPTransportTestRelative.test__remote_path): Use
assertIsSameRealPath.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
            test_dir = '/' + test_dir
129
129
        # try what is currently used:
130
130
        # remote path = self._abspath(relpath)
131
 
        self.assertEqual(test_dir + '/relative', t._remote_path('relative'))
 
131
        self.assertIsSameRealPath(test_dir + '/relative',
 
132
                                  t._remote_path('relative'))
132
133
        # we dont os.path.join because windows gives us the wrong path
133
134
        root_segments = test_dir.split('/')
134
135
        root_parent = '/'.join(root_segments[:-1])
135
136
        # .. should be honoured
136
 
        self.assertEqual(root_parent + '/sibling', t._remote_path('../sibling'))
 
137
        self.assertIsSameRealPath(root_parent + '/sibling',
 
138
                                  t._remote_path('../sibling'))
137
139
        # /  should be illegal ?
138
140
        ### FIXME decide and then test for all transports. RBC20051208
139
141