Skip to content

Commit

Permalink
parameterized name test into a single pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
skirui-source committed Dec 14, 2021
1 parent 9a6fef4 commit 6ca1f20
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions python/cudf/cudf/tests/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,20 +1409,10 @@ def test_error_values():


@pytest.mark.parametrize("dtype", utils.TIMEDELTA_TYPES)
def test_create_TimedeltaIndex(dtype):
@pytest.mark.parametrize("name", [None, "delta-index"])
def test_create_TimedeltaIndex(dtype, name):
gdi = cudf.TimedeltaIndex(
[1132223, 2023232, 342234324, 4234324], dtype=dtype
[1132223, 2023232, 342234324, 4234324], dtype=dtype, name=name
)
pdi = gdi.to_pandas()

assert_eq(pdi, gdi)


@pytest.mark.parametrize("dtype", utils.TIMEDELTA_TYPES)
def test_create_TimedeltaIndex_with_name(dtype):
gdi = cudf.TimedeltaIndex(
[1132223, 2023232, 342234324, 4234324], dtype=dtype, name="delta-index"
)
pdi = gdi.to_pandas()

assert_eq(pdi, gdi)

0 comments on commit 6ca1f20

Please sign in to comment.