Skip to content

Commit

Permalink
TST: adding ObjectEngine tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhlim committed May 9, 2021
1 parent 4f6ef00 commit 10f9886
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pandas/tests/indexes/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ def test_getitem_deprecated_float(idx):

@pytest.mark.parametrize(
"idx,targets",
[(Float64Index([]), np.array([np.nan])), (DatetimeIndex([]), np.array([NaT]))],
[
(Index([]), np.array([None])),
(Float64Index([]), np.array([np.nan])),
(DatetimeIndex([]), np.array([NaT])),
],
)
def test_get_stargets(idx, targets):
# GH 35392
Expand All @@ -275,6 +279,7 @@ def test_get_stargets(idx, targets):
@pytest.mark.parametrize(
"idx,val,expected",
[
(Index([]), None, -1),
(Int64Index([]), 1, 1),
(Float64Index([]), np.nan, -1),
(DatetimeIndex([]), NaT, -1),
Expand All @@ -288,6 +293,7 @@ def test_convert_val_if_nan(idx, val, expected):
@pytest.mark.parametrize(
"idx,target,val,expected",
[
(Index([]), None, None, True),
(Int64Index([]), 1, 1, True),
(Float64Index([]), np.nan, np.nan, True),
(Float64Index([]), 1, np.nan, False),
Expand Down

0 comments on commit 10f9886

Please sign in to comment.