~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

merge with bzr.dev and put the NEWS entry in the IN DEVELOPMENT section

Show diffs side-by-side

added added

removed removed

Lines of Context:
572
572
            str(err), "The message handler raised an exception:\n")
573
573
        self.assertEndsWith(str(err), "Exception: example error\n")
574
574
 
 
575
    def test_must_have_working_tree(self):
 
576
        err = errors.MustHaveWorkingTree('foo', 'bar')
 
577
        self.assertEqual(str(err), "Branching 'bar'(foo) must create a"
 
578
                                   " working tree.")
 
579
 
 
580
    def test_invalid_shelf_id(self):
 
581
        invalid_id = "foo"
 
582
        err = errors.InvalidShelfId(invalid_id)
 
583
        self.assertEqual('"foo" is not a valid shelf id, '
 
584
            'try a number instead.', str(err))
 
585
 
575
586
 
576
587
class PassThroughError(errors.BzrError):
577
588