/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-06 05:53:44 UTC
  • mfrom: (2063 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2071.
  • Revision ID: john@arbash-meinel.com-20061006055344-e73b97b7c6ca6e72
[merge] bzr.dev 2063

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
        finally:
101
101
            _set_protocol_handlers(saved_handlers)
102
102
 
 
103
    def test__combine_paths(self):
 
104
        t = Transport('/')
 
105
        self.assertEqual('/home/sarah/project/foo',
 
106
                         t._combine_paths('/home/sarah', 'project/foo'))
 
107
        self.assertEqual('/etc',
 
108
                         t._combine_paths('/home/sarah', '../../etc'))
 
109
 
103
110
 
104
111
class TestCoalesceOffsets(TestCase):
105
112
    
168
175
    def test_clone(self):
169
176
        transport = MemoryTransport()
170
177
        self.assertTrue(isinstance(transport, MemoryTransport))
 
178
        self.assertEqual("memory:///", transport.clone("/").base)
171
179
 
172
180
    def test_abspath(self):
173
181
        transport = MemoryTransport()
174
182
        self.assertEqual("memory:///relpath", transport.abspath('relpath'))
175
183
 
 
184
    def test_abspath_of_root(self):
 
185
        transport = MemoryTransport()
 
186
        self.assertEqual("memory:///", transport.base)
 
187
        self.assertEqual("memory:///", transport.abspath('/'))
 
188
 
176
189
    def test_relpath(self):
177
190
        transport = MemoryTransport()
178
191
 
409
422
        base_url = self._server.get_url()
410
423
        # try getting the transport via the regular interface:
411
424
        t = get_transport(base_url)
412
 
        if not isinstance(t, self.transport_class): 
 
425
        if not isinstance(t, self.transport_class):
413
426
            # we did not get the correct transport class type. Override the
414
427
            # regular connection behaviour by direct construction.
415
428
            t = self.transport_class(base_url)