Rev 2837: Fix 141382 by comparing real paths. in file:///v/home/vila/src/bzr/bugs/osx.clean/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Sep 24 10:40:03 BST 2007
At file:///v/home/vila/src/bzr/bugs/osx.clean/
------------------------------------------------------------
revno: 2837
revision-id: v.ladeuil+lp at free.fr-20070924094001-k8z6tlxnlcimvg5a
parent: v.ladeuil+lp at free.fr-20070924085356-g7mx4wdj2np35j37
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: osx.clean
timestamp: Mon 2007-09-24 11:40:01 +0200
message:
Fix 141382 by comparing real paths.
* bzrlib/tests/test_sftp_transport.py:
(SFTPTransportTestRelative.test__remote_path): Use
assertIsSameRealPath.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2007-09-24 08:53:56 +0000
+++ b/NEWS 2007-09-24 09:40:01 +0000
@@ -75,6 +75,10 @@
* Fix selftest semi-random noise during http related tests.
(Vincent Ladeuil, #140614)
+ * Fix failing test by comparing real paths to cover the case where the TMPDIR
+ contains a symbolic link.
+ (Vincent Ladeuil, #141382).
+
* HttpServer and FtpServer need to be closed properly or a listening socket
will remain opened.
(Vincent Ladeuil, #140055)
=== modified file 'bzrlib/tests/test_sftp_transport.py'
--- a/bzrlib/tests/test_sftp_transport.py 2007-09-24 08:46:35 +0000
+++ b/bzrlib/tests/test_sftp_transport.py 2007-09-24 09:40:01 +0000
@@ -128,12 +128,14 @@
test_dir = '/' + test_dir
# try what is currently used:
# remote path = self._abspath(relpath)
- self.assertEqual(test_dir + '/relative', t._remote_path('relative'))
+ self.assertIsSameRealPath(test_dir + '/relative',
+ t._remote_path('relative'))
# we dont os.path.join because windows gives us the wrong path
root_segments = test_dir.split('/')
root_parent = '/'.join(root_segments[:-1])
# .. should be honoured
- self.assertEqual(root_parent + '/sibling', t._remote_path('../sibling'))
+ self.assertIsSameRealPath(root_parent + '/sibling',
+ t._remote_path('../sibling'))
# / should be illegal ?
### FIXME decide and then test for all transports. RBC20051208
More information about the bazaar-commits
mailing list