Skip to content

Commit

Permalink
more tests for deterministic names
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Aug 4, 2015
1 parent e388ed8 commit 9ad488e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dask/dataframe/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ def test_loc():
assert eq(d.loc[1000:], full.loc[1000:])
assert eq(d.loc[-2000:-1000], full.loc[-2000:-1000])

assert sorted(d.loc[5].dask) == sorted(d.loc[5].dask)
assert sorted(d.loc[5].dask) != sorted(d.loc[6].dask)


def test_loc_with_text_dates():
Expand All @@ -510,6 +512,9 @@ def test_loc_with_text_dates():
def test_loc_with_series():
assert eq(d.loc[d.a % 2 == 0], full.loc[full.a % 2 == 0])

assert sorted(d.loc[d.a % 2].dask) == sorted(d.loc[d.a % 2].dask)
assert sorted(d.loc[d.a % 2].dask) != sorted(d.loc[d.a % 3].dask)


def test_iloc_raises():
assert raises(AttributeError, lambda: d.iloc[:5])
Expand Down Expand Up @@ -781,6 +786,8 @@ def test_deterministic_arithmetic_names():
a = dd.from_pandas(df, npartitions=2)

assert sorted((a.x + a.y ** 2).dask) == sorted((a.x + a.y ** 2).dask)
assert sorted((a.x + a.y ** 2).dask) != sorted((a.x + a.y ** 3).dask)
assert sorted((a.x + a.y ** 2).dask) != sorted((a.x - a.y ** 2).dask)


def test_deterministic_reduction_names():
Expand Down

0 comments on commit 9ad488e

Please sign in to comment.