Skip to content

Commit

Permalink
Update tests that assumed the wrong output type.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Feb 23, 2022
1 parent 710e2c7 commit 0f65f14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions python/cudf/cudf/tests/test_binops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,10 +1744,6 @@ def test_binops_with_lhs_numpy_scalar(frame, dtype):
expected = val == data.to_pandas()
got = val == data

# In case of index, expected would be a numpy array
if isinstance(data, cudf.BaseIndex):
expected = pd.Index(expected)

utils.assert_eq(expected, got)


Expand Down Expand Up @@ -2945,7 +2941,7 @@ def test_binops_non_cudf_types(obj_class, binop, other_type):
data = range(1, 100)
lhs = obj_class(data)
rhs = other_type(data)
assert cp.all((binop(lhs, rhs) == binop(lhs, lhs)).values)
assert (binop(lhs, rhs) == binop(lhs, lhs)).all()


@pytest.mark.parametrize("binop", _binops + _binops_compare)
Expand Down
6 changes: 2 additions & 4 deletions python/cudf/cudf/tests/test_pickling.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2018-2022, NVIDIA CORPORATION.

import sys

Expand Down Expand Up @@ -90,9 +90,7 @@ def test_pickle_index():
idx = GenericIndex(np.arange(nelem), name="a")
pickled = pickle.dumps(idx)
out = pickle.loads(pickled)
# TODO: Once operations like `all` are supported on Index objects, we can
# just use that without calling values first.
assert (idx == out).values.all()
assert (idx == out).all()


def test_pickle_buffer():
Expand Down

0 comments on commit 0f65f14

Please sign in to comment.