/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 bzrlib/tests/test_errors.py

  • Committer: Robert Collins
  • Date: 2008-01-25 10:46:10 UTC
  • mto: This revision was merged to the branch mainline in revision 3211.
  • Revision ID: robertc@robertcollins.net-20080125104610-4qweeqqch2feyxdv
 * The ``register-branch`` command will now use the public url of the branch
   containing the current directory, if one has been set and no explicit branch is provided.
   (Robert Collins)

 * New error ``NoPublicBranch`` for commands that need a public branch to
   operate. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    bzrdir,
23
23
    errors,
24
24
    symbol_versioning,
 
25
    urlutils,
25
26
    )
26
27
from bzrlib.tests import TestCase, TestCaseWithTransport
27
28
 
121
122
        error = errors.MediumNotConnected("a medium")
122
123
        self.assertEqualDiff(
123
124
            "The medium 'a medium' is not connected.", str(error))
124
 
        
 
125
 
 
126
    def test_no_public_branch(self):
 
127
        b = self.make_branch('.')
 
128
        error = errors.NoPublicBranch(b)
 
129
        url = urlutils.unescape_for_display(b.base, 'ascii')
 
130
        self.assertEqualDiff(
 
131
            'There is no public branch set for "%s".' % url, str(error))
 
132
 
125
133
    def test_no_repo(self):
126
134
        dir = bzrdir.BzrDir.create(self.get_url())
127
135
        error = errors.NoRepositoryPresent(dir)