~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: Ian Clatworthy
  • Date: 2008-07-30 04:34:59 UTC
  • mfrom: (3535.8.4 bzr.dev.send)
  • mto: This revision was merged to the branch mainline in revision 3594.
  • Revision ID: ian.clatworthy@canonical.com-20080730043459-fpeor9jlisylif0b
Give a more specific error when target branch unreachable (James Westby)

Show diffs side-by-side

added added

removed removed

Lines of Context:
384
384
            host='ahost', port=444, msg='Unable to connect to ssh host',
385
385
            orig_error='my_error')
386
386
 
 
387
    def test_target_not_branch(self):
 
388
        """Test the formatting of TargetNotBranch."""
 
389
        error = errors.TargetNotBranch('foo')
 
390
        self.assertEqual(
 
391
            "Your branch does not have all of the revisions required in "
 
392
            "order to merge this merge directive and the target "
 
393
            "location specified in the merge directive is not a branch: "
 
394
            "foo.", str(error))
 
395
 
387
396
    def test_malformed_bug_identifier(self):
388
397
        """Test the formatting of MalformedBugIdentifier."""
389
398
        error = errors.MalformedBugIdentifier('bogus', 'reason for bogosity')