def test_memoised_call_variations():
    'Call memoised function with identical arguments using variable format.'
    memoiser = ftrack_api.cache.Memoiser()
    expected = {'result': 3}
    assert_memoised_call(memoiser, function, args=(1,), expected=expected, memoised=False)
    for (args, kw) in [((), {'x': 1}), ((), {'x': 1, 'y': 2}), ((1,), {'y': 2}), ((1,), {})]:
        assert_memoised_call(memoiser, function, args=args, kw=kw, expected=expected)
    assert_memoised_call(memoiser, function, kw={'x': 2}, expected={'result': 4}, memoised=False)
    assert_memoised_call(memoiser, function, kw={'x': 3, 'y': 2}, expected={'result': 5}, memoised=False)
    assert_memoised_call(memoiser, function, args=(4,), kw={'y': 2}, expected={'result': 6}, memoised=False)
    assert_memoised_call(memoiser, function, args=(5,), expected={'result': 7}, memoised=False)
Call memoised function with identical arguments using variable format.
def test_memoised_call_variations():
    
    memoiser = ftrack_api.cache.Memoiser()
    expected = {'result': 3}
    assert_memoised_call(memoiser, function, args=(1,), expected=expected, memoised=False)
    for (args, kw) in [((), {'x': 1}), ((), {'x': 1, 'y': 2}), ((1,), {'y': 2}), ((1,), {})]:
        assert_memoised_call(memoiser, function, args=args, kw=kw, expected=expected)
    assert_memoised_call(memoiser, function, kw={'x': 2}, expected={'result': 4}, memoised=False)
    assert_memoised_call(memoiser, function, kw={'x': 3, 'y': 2}, expected={'result': 5}, memoised=False)
    assert_memoised_call(memoiser, function, args=(4,), kw={'y': 2}, expected={'result': 6}, memoised=False)
    assert_memoised_call(memoiser, function, args=(5,), expected={'result': 7}, memoised=False)