def test_df_sum_diff():
    a, b = _arand(), _arand()
    sum_of_columns = toolbox.df_sum(*_df(a, b))
    diff = toolbox.df_diff(*_df(sum_of_columns, b))
    assert _numerically_equal(a, diff)
def test_df_err_sum():
    a, b = _erand(), _erand()
    err_sum = toolbox.df_err_sum(*_df(a, b))
    sum_of_columns = toolbox.df_sum(*_df(a, b))
    assert all(err_sum > 0)
    assert all(sum_of_columns >= err_sum)
def test_df_sum_zero(random, zeros):
    assert all(random == toolbox.df_sum(*_df(random, zeros)))