diff --git a/pandas/tests/reductions/test_reductions.py b/pandas/tests/reductions/test_reductions.py index 9d33e52709bd2..a68595546eb83 100644 --- a/pandas/tests/reductions/test_reductions.py +++ b/pandas/tests/reductions/test_reductions.py @@ -198,6 +198,18 @@ def test_numpy_reduction_with_tz_aware_dtype(self, tz_aware_fixture, func): result = getattr(np, func)(expected, expected) tm.assert_series_equal(result, expected) + def test_nan_int_timedelta_sum(self): + # GH 27185 + df = DataFrame( + { + "A": Series([1, 2, NaT], dtype="timedelta64[ns]"), + "B": Series([1, 2, np.nan], dtype="Int64"), + } + ) + expected = Series({"A": Timedelta(3), "B": 3}) + result = df.sum() + tm.assert_series_equal(result, expected) + class TestIndexReductions: # Note: the name TestIndexReductions indicates these tests