~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Patch Queue Manager
  • Date: 2012-01-28 13:24:39 UTC
  • mfrom: (6450.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20120128132439-phvlss4cq7bf5rji
(jelmer) Merge the 2.5 branch. (Jelmer Vernooij)

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):