

def test_by_count():
    ((chunk, chunk_expr), (agg, agg_expr)) = split(t, by(t.name, total=t.amount.count()))
    assert chunk_expr.isidentical(by(chunk.name, total=chunk.amount.count()))
    assert agg_expr.isidentical(by(agg.name, total=agg.total.sum()))

dataset/ETHPy150Open blaze/blaze/blaze/expr/tests/test_split.py test_by_count/original