def test_set_index_npartitions():
    data = pd.DataFrame(index=pd.Index(['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'C']))
    data = dd.from_pandas(data, npartitions=2)
    output = data.reset_index().set_index('index', npartitions=1)
    assert (output.npartitions == 1)
def test_set_index_npartitions():
    data = pd.DataFrame(index=pd.Index(['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'C']))
    data = dd.from_pandas(data, npartitions=2)
    output = data.reset_index().set_index('index', npartitions=1)
    assert (output.npartitions == 1)