~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

Fix test_retire_bzrdir to cope with transports that aren't backed by disk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1366
1366
 
1367
1367
    def test_retire_bzrdir(self):
1368
1368
        bd = self.make_bzrdir('.')
 
1369
        transport = bd.root_transport
1369
1370
        # must not overwrite existing directories
1370
 
        self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',])
1371
 
        self.failUnlessExists('.bzr')
 
1371
        self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',],
 
1372
            transport=transport)
 
1373
        self.failUnless(transport.has('.bzr'))
1372
1374
        bd.retire_bzrdir()
1373
 
        self.failIfExists('.bzr')
1374
 
        self.failUnlessExists('.bzr.retired.1')
 
1375
        self.failIf(transport.has('.bzr'))
 
1376
        self.failUnless(transport.has('.bzr.retired.1'))
1375
1377
 
1376
1378
class TestBreakLock(TestCaseWithBzrDir):
1377
1379