Exemplo n.º 1
0
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
Exemplo n.º 2
0
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