~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Martin Pool
  • Date: 2006-06-10 23:16:19 UTC
  • mfrom: (1759 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1761.
  • Revision ID: mbp@sourcefrog.net-20060610231619-05b997deeb005d02
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        bzrdir.BzrDirFormat.set_default_format(SampleBzrDirFormat())
46
46
        # creating a bzr dir should now create an instrumented dir.
47
47
        try:
48
 
            result = bzrdir.BzrDir.create('memory:/')
 
48
            result = bzrdir.BzrDir.create('memory:///')
49
49
            self.failUnless(isinstance(result, SampleBzrDir))
50
50
        finally:
51
51
            bzrdir.BzrDirFormat.set_default_format(old_format)
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