~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: 2008-07-30 05:06:05 UTC
  • mfrom: (3592.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080730050605-5hhtw13vhgailydn
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')