def test_curry_partial_sequential_use(): _dummie, _mock = create_dummie_mock() curry_function = curry(_dummie) partial = curry_function(arg1) result = partial(arg2, arg3) assert result is mock_result _mock.assert_called_once_with(arg1, arg2, arg3)
def test_curry_with_two_placeholder(): _dummie, _mock = create_dummie_mock() curry_function = curry(_dummie) partial = curry_function(p, arg2, arg3) result = partial(arg1) assert result is mock_result _mock.assert_called_once_with(arg1, arg2, arg3)
def test_curry_natural_use(): _dummie, _mock = create_dummie_mock() curry_function = curry(_dummie) result = curry_function(arg1, arg2, arg3) assert result is mock_result _mock.assert_called_once_with(arg1, arg2, arg3)