/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

  • Committer: John Arbash Meinel
  • Date: 2006-08-31 18:18:09 UTC
  • mfrom: (1978 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1979.
  • Revision ID: john@arbash-meinel.com-20060831181809-0097f4d21cb944fd
[merge] bzr.dev 1978

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        self.check_transport_contents('another contents\nfor d\n', t, 'd')
143
143
 
144
144
        self.assertRaises(NoSuchFile,
145
 
                          t.put, 'path/doesnt/exist/c', 'contents')
 
145
                          t.put, 'path/doesnt/exist/c', StringIO('contents'))
146
146
 
147
147
    def test_put_permissions(self):
148
148
        t = self.get_transport()
543
543
        t.mkdir('adir')
544
544
        t.mkdir('adir/bdir')
545
545
        t.rmdir('adir/bdir')
546
 
        self.assertRaises(NoSuchFile, t.stat, 'adir/bdir')
 
546
        self.assertRaises(PathError, t.rmdir, 'adir/bdir')
547
547
        t.rmdir('adir')
548
 
        self.assertRaises(NoSuchFile, t.stat, 'adir')
 
548
        self.assertRaises(PathError, t.rmdir, 'adir')
549
549
 
550
550
    def test_rmdir_not_empty(self):
551
551
        """Deleting a non-empty directory raises an exception
773
773
        self.assertListRaises(PathError, t.list_dir, 'c/f')
774
774
        self.assertListRaises(PathError, t.list_dir, 'a')
775
775
 
 
776
    def test_list_dir_result_is_url_escaped(self):
 
777
        t = self.get_transport()
 
778
        if not t.listable():
 
779
            raise TestSkipped("transport not listable")
 
780
 
 
781
        if not t.is_readonly():
 
782
            self.build_tree(['a/', 'a/%'], transport=t)
 
783
        else:
 
784
            self.build_tree(['a/', 'a/%'])
 
785
        
 
786
        names = list(t.list_dir('a'))
 
787
        self.assertEqual(['%25'], names)
 
788
        self.assertIsInstance(names[0], str)
 
789
 
776
790
    def test_clone(self):
777
791
        # TODO: Test that clone moves up and down the filesystem
778
792
        t1 = self.get_transport()