~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-05 15:10:33 UTC
  • mfrom: (5523.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20101105151033-ozpgdr443dvkzz3j
(vila) Merge 2.2 into trunk resolving conflicts and including fix for
        bug #632465 (Vincent Ladeuil)

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