/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

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 02:13:25 UTC
  • mfrom: (7490.7.21 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200506021325-awbmmqu1zyorz7sj
Merge 3.1 branch.

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