/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_bzrdir.py

Add a -b option to ''brz branch''.

Merged from https://code.launchpad.net/~jelmer/brz/flag-b/+merge/381552

Show diffs side-by-side

added added

removed removed

Lines of Context:
821
821
        self.assertEqual(os.path.realpath('topdir/foo'),
822
822
                         self.local_branch_path(branch))
823
823
 
 
824
    def test_open_tree_or_branch_named(self):
 
825
        tree = self.make_branch_and_tree('topdir')
 
826
        self.assertRaises(
 
827
            NotBranchError,
 
828
            bzrdir.BzrDir.open_tree_or_branch, 'topdir', name='missing')
 
829
        tree.branch.controldir.create_branch('named')
 
830
        tree, branch = bzrdir.BzrDir.open_tree_or_branch('topdir', name='named')
 
831
        self.assertEqual(os.path.realpath('topdir'),
 
832
                         os.path.realpath(tree.basedir))
 
833
        self.assertEqual(os.path.realpath('topdir'),
 
834
                         self.local_branch_path(branch))
 
835
        self.assertEqual(branch.name, 'named')
 
836
        self.assertIs(tree.controldir, branch.controldir)
 
837
 
824
838
    def test_open_from_transport(self):
825
839
        # transport pointing at bzrdir should give a bzrdir with root transport
826
840
        # set to the given transport