def test_set_index_overlap_2():
    data = pd.DataFrame(index=pd.Index(['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'C'], name='index'))
    ddf1 = dd.from_pandas(data, npartitions=2)
    ddf2 = ddf1.reset_index().repartition(8).set_index('index', sorted=True)
    assert_eq(ddf1, ddf2)
    assert (ddf2.npartitions == 8)
def test_set_index_overlap_2():
    data = pd.DataFrame(index=pd.Index(['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'C'], name='index'))
    ddf1 = dd.from_pandas(data, npartitions=2)
    ddf2 = ddf1.reset_index().repartition(8).set_index('index', sorted=True)
    assert_eq(ddf1, ddf2)
    assert (ddf2.npartitions == 8)