コード例 #1
0
ファイル: bindings_test.py プロジェクト: hashrc/rawkit-1
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)
コード例 #2
0
ファイル: bindings_test.py プロジェクト: hashrc/rawkit-1
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)
コード例 #3
0
ファイル: bindings_test.py プロジェクト: hashrc/rawkit-1
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)