~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: v.ladeuil+lp at free
  • Date: 2006-11-08 07:44:30 UTC
  • mfrom: (2123 +trunk)
  • mto: (2145.1.1 keepalive)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: v.ladeuil+lp@free.fr-20061108074430-a9c08d4a475bd97f
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
943
943
            l.sort()
944
944
            return l
945
945
 
946
 
        # SftpServer creates control files in the working directory
947
 
        # so lets move down a directory to avoid those.
948
 
        if not t.is_readonly():
949
 
            t.mkdir('wd')
950
 
        else:
951
 
            os.mkdir('wd')
952
 
        t = t.clone('wd')
953
 
 
954
946
        self.assertEqual([], sorted_list('.'))
955
947
        # c2 is precisely one letter longer than c here to test that
956
948
        # suffixing is not confused.
957
949
        # a%25b checks that quoting is done consistently across transports
958
950
        tree_names = ['a', 'a%25b', 'b', 'c/', 'c/d', 'c/e', 'c2/']
 
951
 
959
952
        if not t.is_readonly():
960
953
            self.build_tree(tree_names, transport=t)
961
954
        else:
962
 
            self.build_tree(['wd/' + name for name in tree_names])
 
955
            self.build_tree(tree_names)
963
956
 
964
957
        self.assertEqual(
965
958
            ['a', 'a%2525b', 'b', 'c', 'c2'], sorted_list('.'))
969
962
            t.delete('c/d')
970
963
            t.delete('b')
971
964
        else:
972
 
            os.unlink('wd/c/d')
973
 
            os.unlink('wd/b')
 
965
            os.unlink('c/d')
 
966
            os.unlink('b')
974
967
            
975
968
        self.assertEqual(['a', 'a%2525b', 'c', 'c2'], sorted_list('.'))
976
969
        self.assertEqual(['e'], sorted_list('c'))