~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: Vincent Ladeuil
  • Date: 2010-11-05 14:07:45 UTC
  • mfrom: (5050.45.7 2.2)
  • mto: This revision was merged to the branch mainline in revision 5524.
  • Revision ID: v.ladeuil+lp@free.fr-20101105140745-e5xwb9b75a4i7ef1
Merge 2.2 into trunk resolving conflicts and including fix for bug #632465

Show diffs side-by-side

added added

removed removed

Lines of Context:
672
672
        err = errors.NotBranchError('path', bzrdir=bzrdir)
673
673
        self.assertEqual('Not a branch: "path".', str(err))
674
674
 
 
675
    def test_not_branch_bzrdir_with_recursive_not_branch_error(self):
 
676
        class FakeBzrDir(object):
 
677
            def open_repository(self):
 
678
                # str() on the NotBranchError will trigger a call to this,
 
679
                # which in turn will another, identical NotBranchError.
 
680
                raise errors.NotBranchError('path', bzrdir=FakeBzrDir())
 
681
        err = errors.NotBranchError('path', bzrdir=FakeBzrDir())
 
682
        self.assertEqual('Not a branch: "path".', str(err))
 
683
 
675
684
    def test_not_branch_laziness(self):
676
685
        real_bzrdir = self.make_bzrdir('path')
677
686
        class FakeBzrDir(object):