~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-31 15:43:17 UTC
  • mfrom: (6437.3.28 2.5)
  • mto: (6437.23.1 2.5)
  • mto: This revision was merged to the branch mainline in revision 6458.
  • Revision ID: jelmer@samba.org-20120131154317-y028tz0r9xesvn9p
MergeĀ 2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1447
1447
        tree.bzrdir.create_branch(name="another-colocated-branch")
1448
1448
        converter = tree.bzrdir._format.get_converter(
1449
1449
            bzrdir.BzrDirMetaFormat1())
1450
 
        self.assertRaises(errors.BzrError, converter.convert, tree.bzrdir,
1451
 
            None)
 
1450
        result = converter.convert(tree.bzrdir, bzrdir.BzrDirMetaFormat1())
 
1451
        self.assertIsInstance(result._format, bzrdir.BzrDirMetaFormat1)
 
1452
 
 
1453
    def test_nested(self):
 
1454
        tree = self.make_branch_and_tree('.', format='development-colo')
 
1455
        tree.bzrdir.create_branch(name='foo')
 
1456
        tree.bzrdir.create_branch(name='fool/bla')
 
1457
        self.assertRaises(
 
1458
            errors.ParentBranchExists, tree.bzrdir.create_branch,
 
1459
            name='foo/bar')
 
1460
 
 
1461
    def test_parent(self):
 
1462
        tree = self.make_branch_and_tree('.', format='development-colo')
 
1463
        tree.bzrdir.create_branch(name='fool/bla')
 
1464
        tree.bzrdir.create_branch(name='foo/bar')
 
1465
        self.assertRaises(
 
1466
            errors.AlreadyBranchError, tree.bzrdir.create_branch,
 
1467
            name='foo')
1452
1468
 
1453
1469
 
1454
1470
class SampleBzrFormat(bzrdir.BzrFormat):