/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 bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
                           )
46
46
from bzrlib.osutils import getcwd
47
47
from bzrlib.smart import medium
48
 
from bzrlib.tests import TestCaseInTempDir, TestScenarioApplier, TestSkipped
 
48
from bzrlib.tests import (
 
49
    TestCaseInTempDir,
 
50
    TestScenarioApplier,
 
51
    TestSkipped,
 
52
    TestNotApplicable,
 
53
    )
49
54
from bzrlib.tests.test_transport import TestTransportImplementation
50
55
from bzrlib.transport import (
51
56
    ConnectedTransport,
900
905
        self.assertFalse(t.has('adir/bdir'))
901
906
        self.assertFalse(t.has('adir/bsubdir'))
902
907
 
 
908
    def test_rename_across_subdirs(self):
 
909
        t = self.get_transport()
 
910
        if t.is_readonly():
 
911
            raise TestNotApplicable("transport is readonly")
 
912
        t.mkdir('a')
 
913
        t.mkdir('b')
 
914
        ta = t.clone('a')
 
915
        tb = t.clone('b')
 
916
        ta.put_bytes('f', 'aoeu')
 
917
        ta.rename('f', '../b/f')
 
918
        self.assertTrue(tb.has('f'))
 
919
        self.assertFalse(ta.has('f'))
 
920
        self.assertTrue(t.has('b/f'))
 
921
 
903
922
    def test_delete_tree(self):
904
923
        t = self.get_transport()
905
924
 
986
1005
    def test_connection_error(self):
987
1006
        """ConnectionError is raised when connection is impossible.
988
1007
        
989
 
        The error may be raised from either the constructor or the first
990
 
        operation on the transport.
 
1008
        The error should be raised from the first operation on the transport.
991
1009
        """
992
1010
        try:
993
1011
            url = self._server.get_bogus_url()