def test_can_raise_and_catch_piip_errors(): my_err = perror.new() ok = False try: my_err.throw() assert False except failure(my_err), e: ok = True
def test_can_raise_and_catch_piip_errors_with_kwarg(): my_err = perror.new() ok = False try: my_err.throw(kwarg='kwarg') assert False except failure(my_err), e: assert e.kwarg == 'kwarg' ok = True