Skip to content

Commit

Permalink
TST: differentiate 0 and np.nan (pandas-dev#35498)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhlim committed Aug 21, 2020
1 parent 4f9d9df commit 9338d3b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pandas/tests/indexes/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ def test_getitem_deprecated_float(idx):
[NaT],
np.array([1, 2], dtype=np.int64),
),
(
np.array([np.nan, 0, np.nan], dtype=object),
[np.nan],
np.array([0, 2], dtype=np.int64),
),
(
np.array([np.nan, 0, np.nan], dtype=object),
[0],
np.array([1], dtype=np.int64),
),
(
np.array([np.nan, 0, np.nan], dtype=object),
[np.nan, 0],
np.array([0, 2, 1], dtype=np.int64),
),
],
)
def test_get_indexer_non_unique_multiple_nans(idx, target, expected):
Expand Down

0 comments on commit 9338d3b

Please sign in to comment.