/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

Include formatted traceback in SmartMessageHandlerError details.
        (Andrew Bennetts)

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):