~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Robert Collins
  • Date: 2006-05-24 03:00:14 UTC
  • mto: (1755.1.2 integration)
  • mto: This revision was merged to the branch mainline in revision 1757.
  • Revision ID: robertc@robertcollins.net-20060524030014-0af2706006ed9f98
Bugfix create_branch_convenience at the root of a file system to not loop
infinitely. Teach Benchmark.make_kernel_like_Tree to support making a tree
in a ramdisk to remove external IO costs for the repository when desired.

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
        finally:
255
255
            bzrdir.BzrDirFormat.set_default_format(old_format)
256
256
 
 
257
    def test_create_branch_convenience_root(self):
 
258
        """Creating a branch at the root of a fs should work."""
 
259
        self.transport_server = MemoryServer
 
260
        # outside a repo the default convenience output is a repo+branch_tree
 
261
        old_format = bzrdir.BzrDirFormat.get_default_format()
 
262
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirMetaFormat1())
 
263
        try:
 
264
            branch = bzrdir.BzrDir.create_branch_convenience(self.get_url())
 
265
            self.assertRaises(errors.NoWorkingTree,
 
266
                              branch.bzrdir.open_workingtree)
 
267
            branch.bzrdir.open_repository()
 
268
        finally:
 
269
            bzrdir.BzrDirFormat.set_default_format(old_format)
 
270
 
257
271
    def test_create_branch_convenience_under_shared_repo(self):
258
272
        # inside a repo the default convenience output is a branch+ follow the
259
273
        # repo tree policy