~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

Transport behaviour at the root of the URL is now defined and tested.
(Andrew Bennetts, Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
837
837
        # Cloning to "/" should take us to exactly the same location.
838
838
        self.assertEqual(root_transport.base, orig_transport.clone("/").base)
839
839
 
 
840
        # At the root, the URL must still end with / as its a directory
 
841
        self.assertEqual(root_transport.base[-1], '/')
 
842
 
 
843
    def test_clone_from_root(self):
 
844
        """At the root, cloning to a simple dir should just do string append."""
 
845
        orig_transport = self.get_transport()
 
846
        root_transport = orig_transport.clone('/')
 
847
        self.assertEqual(root_transport.base + '.bzr/',
 
848
            root_transport.clone('.bzr').base)
 
849
 
840
850
    def test_base_url(self):
841
851
        t = self.get_transport()
842
852
        self.assertEqual('/', t.base[-1])