~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-16 07:46:07 UTC
  • mfrom: (2070.3.2 memory transport abspath)
  • Revision ID: pqm@pqm.ubuntu.com-20061016074607-30fac1cd072eef6e
(Andrew Bennetts) fix MemoryTransport.abspath() for paths starting with /

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
                         t._combine_paths('/home/sarah', 'project/foo'))
107
107
        self.assertEqual('/etc',
108
108
                         t._combine_paths('/home/sarah', '../../etc'))
 
109
        self.assertEqual('/etc',
 
110
                         t._combine_paths('/home/sarah', '../../../etc'))
 
111
        self.assertEqual('/etc',
 
112
                         t._combine_paths('/home/sarah', '/etc'))
109
113
 
110
114
 
111
115
class TestCoalesceOffsets(TestCase):
186
190
        self.assertEqual("memory:///", transport.base)
187
191
        self.assertEqual("memory:///", transport.abspath('/'))
188
192
 
189
 
    def test_relpath(self):
 
193
    def test_abspath_of_relpath_starting_at_root(self):
190
194
        transport = MemoryTransport()
 
195
        self.assertEqual("memory:///foo", transport.abspath('/foo'))
191
196
 
192
197
    def test_append_and_get(self):
193
198
        transport = MemoryTransport()