Skip to content

Commit ec003ed

Browse files
committed
cleanups
1 parent d6a03a0 commit ec003ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/tests/indexes/common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,10 @@ def test_hasnans_isnans(self, index_flat):
537537

538538
if len(index) == 0:
539539
return
540+
elif isinstance(index, NumericIndex) and is_integer_dtype(index.dtype):
541+
return
540542
elif isinstance(index, DatetimeIndexOpsMixin):
541543
values[1] = iNaT
542-
elif issubclass(index.dtype.type, np.integer):
543-
return
544544
else:
545545
values[1] = np.nan
546546

@@ -557,7 +557,9 @@ def test_hasnans_isnans(self, index_flat):
557557
def test_fillna(self, index):
558558
# GH 11343
559559
if len(index) == 0:
560-
pass
560+
return
561+
elif isinstance(index, NumericIndex) and is_integer_dtype(index.dtype):
562+
return
561563
elif isinstance(index, MultiIndex):
562564
idx = index.copy(deep=True)
563565
msg = "isna is not defined for MultiIndex"
@@ -578,8 +580,6 @@ def test_fillna(self, index):
578580

579581
if isinstance(index, DatetimeIndexOpsMixin):
580582
values[1] = iNaT
581-
elif issubclass(index.dtype.type, np.integer):
582-
return
583583
else:
584584
values[1] = np.nan
585585

0 commit comments

Comments
 (0)