~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: 2007-09-26 04:10:21 UTC
  • mfrom: (2854.1.3 exception-keyerrors)
  • Revision ID: pqm@pqm.ubuntu.com-20070926041021-v62vw12qiba8vi4k
#144633 Fix "unprintable error" message for BzrCheckError and others (mbp)

Show diffs side-by-side

added added

removed removed

Lines of Context:
361
361
        self.assertEqual(
362
362
            "Container has multiple records with the same name: n\xc3\xa5me",
363
363
            str(e))
 
364
        
 
365
    def test_check_error(self):
 
366
        # This has a member called 'message', which is problematic in
 
367
        # python2.5 because that is a slot on the base Exception class
 
368
        e = errors.BzrCheckError('example check failure')
 
369
        self.assertEqual(
 
370
            "Internal check failed: example check failure",
 
371
            str(e))
 
372
        self.assertTrue(e.internal_error)
364
373
 
365
374
 
366
375
class PassThroughError(errors.BzrError):