Skip to content

Commit

Permalink
Fix test function.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Feb 4, 2022
1 parent 3867c65 commit a2fbb64
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/cudf/cudf/tests/test_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

@pytest.fixture(params=dtypes, ids=dtypes)
def pandas_input(request):
rng = np.random.default_rng()
dtype = request.param
rng = np.random.default_rng()
size = 100

def random_ints(dtype, size):
Expand All @@ -39,11 +39,12 @@ def random_ints(dtype, size):
return rng.integers(dtype_min, dtype_max, size=size, dtype=dtype)

try:
dtype = np.dtype(request.param)
dtype = np.dtype(dtype)
except TypeError:
if dtype == "category":
data = random_ints(np.int64, size)
raise
else:
raise
else:
if dtype.kind == "b":
data = rng.choice([False, True], size=size)
Expand Down

0 comments on commit a2fbb64

Please sign in to comment.