/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: Martin Pool
  • Date: 2009-01-13 05:16:26 UTC
  • mfrom: (3936 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3940.
  • Revision ID: mbp@sourcefrog.net-20090113051626-0d5q6luqdoyx4xaf
Fix recommend_upgrade ui and merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
560
560
        err = errors.UnknownErrorFromSmartServer(orig_err)
561
561
        self.assertEquals(
562
562
            "Server sent an unexpected error: ('error', 'tuple')", str(err))
 
563
    
 
564
    def test_smart_message_handler_error(self):
 
565
        # Make an exc_info tuple.
 
566
        try:
 
567
            raise Exception("example error")
 
568
        except Exception:
 
569
            exc_info = sys.exc_info()
 
570
        err = errors.SmartMessageHandlerError(exc_info)
 
571
        self.assertStartsWith(
 
572
            str(err), "The message handler raised an exception:\n")
 
573
        self.assertEndsWith(str(err), "Exception: example error\n")
563
574
 
564
575
 
565
576
class PassThroughError(errors.BzrError):