Skip to content
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
quasiben committed Jun 4, 2019
1 parent 055766d commit 21129ad
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions dask_cudf/tests/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,20 @@ def test_join_inner(left_nrows, right_nrows, left_nkeys, right_nkeys):
expect = expect.to_pandas()

# dask_cudf
left = dgd.from_cudf(left, chunksize=chunksize)
right = dgd.from_cudf(right, chunksize=chunksize)
g_left = dgd.from_cudf(left, chunksize=chunksize)
g_right = dgd.from_cudf(right, chunksize=chunksize)

joined = left.set_index("x").join(
right.set_index("x"), how="inner", lsuffix="l", rsuffix="r"
joined = g_left.set_index("x").join(
g_right.set_index("x"), how="inner", lsuffix="l", rsuffix="r"
)

got = joined.compute().to_pandas()

# Check index
np.testing.assert_array_equal(expect.index.values, got.index.values)
# currently a random number
got.index.name = None
# correct value of 'x'
expect.index.name = None
dd.assert_eq(expect, got)

# Check rows in each groups
expect_rows = {}
Expand Down

0 comments on commit 21129ad

Please sign in to comment.