/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_implementations.py

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
764
764
        t.mkdir('adir/bdir')
765
765
        self.assertRaises(PathError, t.rmdir, 'adir')
766
766
 
 
767
    def test_rmdir_empty_but_similar_prefix(self):
 
768
        """rmdir does not get confused by sibling paths.
 
769
        
 
770
        A naive implementation of MemoryTransport would refuse to rmdir
 
771
        ".bzr/branch" if there is a ".bzr/branch-format" directory, because it
 
772
        uses "path.startswith(dir)" on all file paths to determine if directory
 
773
        is empty.
 
774
        """
 
775
        t = self.get_transport()
 
776
        if t.is_readonly():
 
777
            return
 
778
        t.mkdir('foo')
 
779
        t.put_bytes('foo-bar', '')
 
780
        t.mkdir('foo-baz')
 
781
        t.rmdir('foo')
 
782
        self.assertRaises((NoSuchFile, PathError), t.rmdir, 'foo')
 
783
        self.failUnless(t.has('foo-bar'))
 
784
 
767
785
    def test_rename_dir_succeeds(self):
768
786
        t = self.get_transport()
769
787
        if t.is_readonly():