Esempio n. 1
0
def test_check_call_error(error_func, undefined_exit_code):
    """
    An error check with a negative error code should raise.
    """

    with pytest.raises(UnspecifiedError):
        check_call(undefined_exit_code, error_func, None)
Esempio n. 2
0
def test_check_non_error_code_int(int_func, undefined_exit_code):
    """
    An error check to a method which does not return an error should not raise
    (even if the return value looks like an error code).
    """

    check_call(undefined_exit_code, int_func, None)
Esempio n. 3
0
def test_check_call_success(error_func, success_exit_code):
    """
    An error check with a return value of 0 should not raise.
    """

    check_call(success_exit_code, error_func, None)