/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: Canonical.com Patch Queue Manager
  • Date: 2008-04-04 05:59:43 UTC
  • mfrom: (3221.3.9 errors)
  • Revision ID: pqm@pqm.ubuntu.com-20080404055943-evqxhz3x63dz9wbt
(robertc) Add errors needed for branch stacking support. (Robert
        Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
                             " tree atree.", str(error))
176
176
        self.assertIsInstance(error, errors.NoSuchRevision)
177
177
 
 
178
    def test_not_stacked(self):
 
179
        error = errors.NotStacked('a branch')
 
180
        self.assertEqualDiff("The branch 'a branch' is not stacked.",
 
181
            str(error))
 
182
 
178
183
    def test_not_write_locked(self):
179
184
        error = errors.NotWriteLocked('a thing to repr')
180
185
        self.assertEqualDiff("'a thing to repr' is not write locked but needs "
210
215
            " of bzrlib.",
211
216
            str(error))
212
217
 
 
218
    def test_unstackable_branch_format(self):
 
219
        format = u'foo'
 
220
        url = "/foo"
 
221
        error = errors.UnstackableBranchFormat(format, url)
 
222
        self.assertEqualDiff(
 
223
            "The branch '/foo'(foo) is not a stackable format. "
 
224
            "You will need to upgrade the branch to permit branch stacking.",
 
225
            str(error))
 
226
 
 
227
    def test_unstackable_repository_format(self):
 
228
        format = u'foo'
 
229
        url = "/foo"
 
230
        error = errors.UnstackableRepositoryFormat(format, url)
 
231
        self.assertEqualDiff(
 
232
            "The repository '/foo'(foo) is not a stackable format. "
 
233
            "You will need to upgrade the repository to permit branch stacking.",
 
234
            str(error))
 
235
 
213
236
    def test_up_to_date(self):
214
237
        error = errors.UpToDateFormat(bzrdir.BzrDirFormat4())
215
238
        self.assertEqualDiff("The branch format Bazaar-NG branch, "