Skip to content

Commit

Permalink
Add partition based testing
Browse files Browse the repository at this point in the history
- this tests the non-singular-partition based implementation
  • Loading branch information
raunakab committed Oct 7, 2024
1 parent bd509d4 commit 1b4d039
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/dataframe/test_stddev.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,19 @@ def test_stddev(data_and_expected):
pass

assert stddev["a"] == expected


@pytest.mark.parametrize("data_and_expected", TESTS)
def test_stddev_with_multiple_partitions(data_and_expected):
data, expected = data_and_expected
df = daft.from_pydict({"a": data}).into_partitions(2)
result = df.agg(daft.col("a").stddev()).collect()
rows = result.iter_rows()
stddev = next(rows)
try:
next(rows)
assert False
except StopIteration:
pass

assert stddev["a"] == expected

0 comments on commit 1b4d039

Please sign in to comment.