Skip to content

Commit 792cb7b

Browse files
committed
adding pd.NaT to tested null-objects
1 parent 088b494 commit 792cb7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tests/libs/test_hashtable.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,10 @@ def test_mode_stable(self, dtype, writable):
454454

455455
def test_modes_with_nans():
456456
# GH42688, nans aren't mangled
457-
values = np.array([True, pd.NA, np.nan, pd.NA, np.nan], dtype=np.object_)
457+
nulls = [pd.NA, np.nan, pd.NaT, None]
458+
values = np.array([True] + nulls * 2, dtype=np.object_)
458459
modes = ht.mode(values, False)
459-
assert modes.size == 2
460+
assert modes.size == len(nulls)
460461

461462

462463
def test_unique_label_indices_intp(writable):

0 commit comments

Comments
 (0)