def test_set_index_reduces_partitions_large(shuffle_method):
    nbytes = 1000000.0
    nparts = 50
    n = int((nbytes / (nparts * 8)))
    ddf = dd.DataFrame({('x', i): (make_part, n) for i in range(nparts)}, 'x', make_part(1), ([None] * (nparts + 1)))
    ddf2 = ddf.set_index('x', shuffle=shuffle_method, npartitions='auto', partition_size=nbytes)
    assert (1 < ddf2.npartitions < 20)
def test_set_index_reduces_partitions_large(shuffle_method):
    nbytes = 1000000.0
    nparts = 50
    n = int((nbytes / (nparts * 8)))
    ddf = dd.DataFrame({('x', i): (make_part, n) for i in range(nparts)}, 'x', make_part(1), ([None] * (nparts + 1)))
    ddf2 = ddf.set_index('x', shuffle=shuffle_method, npartitions='auto', partition_size=nbytes)
    assert (1 < ddf2.npartitions < 20)