/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

merge trailing whitespace removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
        finally:
108
108
            # restore original values
109
109
            _set_protocol_handlers(saved_handlers)
110
 
            
 
110
 
111
111
    def test_transport_fallback(self):
112
112
        """Transport with missing dependency causes no error"""
113
113
        saved_handlers = _get_protocol_handlers()
368
368
        self.assertEqual(server, relpath_cloned.server)
369
369
        self.assertEqual(server, abspath_cloned.server)
370
370
        server.tearDown()
371
 
    
 
371
 
372
372
    def test_chroot_url_preserves_chroot(self):
373
373
        """Calling get_transport on a chroot transport's base should produce a
374
374
        transport with exactly the same behaviour as the original chroot
386
386
        self.assertEqual(transport.server, new_transport.server)
387
387
        self.assertEqual(transport.base, new_transport.base)
388
388
        server.tearDown()
389
 
        
 
389
 
390
390
    def test_urljoin_preserves_chroot(self):
391
391
        """Using urlutils.join(url, '..') on a chroot URL should not produce a
392
392
        URL that escapes the intended chroot.
551
551
 
552
552
class TestTransportImplementation(TestCaseInTempDir):
553
553
    """Implementation verification for transports.
554
 
    
 
554
 
555
555
    To verify a transport we need a server factory, which is a callable
556
556
    that accepts no parameters and returns an implementation of
557
557
    bzrlib.transport.Server.
558
 
    
 
558
 
559
559
    That Server is then used to construct transport instances and test
560
560
    the transport via loopback activity.
561
561
 
562
 
    Currently this assumes that the Transport object is connected to the 
563
 
    current working directory.  So that whatever is done 
564
 
    through the transport, should show up in the working 
 
562
    Currently this assumes that the Transport object is connected to the
 
563
    current working directory.  So that whatever is done
 
564
    through the transport, should show up in the working
565
565
    directory, and vice-versa. This is a bug, because its possible to have
566
 
    URL schemes which provide access to something that may not be 
567
 
    result in storage on the local disk, i.e. due to file system limits, or 
 
566
    URL schemes which provide access to something that may not be
 
567
    result in storage on the local disk, i.e. due to file system limits, or
568
568
    due to it being a database or some other non-filesystem tool.
569
569
 
570
570
    This also tests to make sure that the functions work with both
571
571
    generators and lists (assuming iter(list) is effectively a generator)
572
572
    """
573
 
    
 
573
 
574
574
    def setUp(self):
575
575
        super(TestTransportImplementation, self).setUp()
576
576
        self._server = self.transport_server()