Beispiel #1
0
def test_add_rows_noop(seed, df):
    num = 0

    result = syn._remove_rows(df, num)

    assert len(result) == len(df) + num
    pdt.assert_frame_equal(result, df)
Beispiel #2
0
def test_add_rows_noop(seed, df):
    num = 0

    result = syn._remove_rows(df, num)

    assert len(result) == len(df) + num
    pdt.assert_frame_equal(result, df)
Beispiel #3
0
def test_remove_rows(seed, df, alloc_id, count):
    num = 2

    result = syn._remove_rows(df, num)

    assert len(result) == len(df) - num
    pdt.assert_frame_equal(
        result,
        pd.DataFrame(
            {alloc_id: ['b', 'c', 'b'],
             count: [2, 3, 4]},
            index=[1, 2, 3]))
Beispiel #4
0
def test_remove_rows(seed, df, alloc_id, count):
    num = 2

    result = syn._remove_rows(df, num)

    assert len(result) == len(df) - num
    pdt.assert_frame_equal(
        result,
        pd.DataFrame({
            alloc_id: ['b', 'c', 'b'],
            count: [2, 3, 4]
        },
                     index=[1, 2, 3]))