def test_multi_exception(self): ctx = {} b = Block(block2) try: b.execute(ctx, continue_on_errors=True) assert False #We should have thrown except Exception, e: assert isinstance(e, CompositeException) assert len(e.exceptions) == 2
def test_multi_exception(self): ctx = {} b = Block(block2) try: b.execute(ctx, continue_on_errors=True) assert False #We should have thrown except Exception, e: assert isinstance(e, CompositeException) assert len(e.exceptions) == 2
def test_single_exception(self): ctx = dict(raises_valuerror=raises_valuerror) b = Block(block) try: b.execute(ctx, continue_on_errors=True) assert False #We should have thrown except Exception, e: assert isinstance(e, ValueError) assert ctx.has_key('d')
def test_single_exception(self): ctx = dict(raises_valuerror=raises_valuerror) b = Block(block) try: b.execute(ctx, continue_on_errors=True) assert False #We should have thrown except Exception, e: assert isinstance(e, ValueError) assert ctx.has_key('d')