@@ -1907,6 +1907,39 @@ def test_df_empty_nullable_min_count_1(self, opname, dtype, exp_dtype):
1907
1907
expected = Series ([pd .NA , pd .NA ], dtype = exp_dtype , index = Index ([0 , 1 ]))
1908
1908
tm .assert_series_equal (result , expected )
1909
1909
1910
+ @pytest .mark .parametrize (
1911
+ "data" ,
1912
+ [
1913
+ {"a" : [0 , 1 , 2 ], "b" : [pd .NaT , pd .NaT , pd .NaT ]},
1914
+ {"a" : [0 , 1 , 2 ], "b" : [Timestamp ("1990-01-01" ), pd .NaT , pd .NaT ]},
1915
+ {
1916
+ "a" : [0 , 1 , 2 ],
1917
+ "b" : [
1918
+ Timestamp ("1990-01-01" ),
1919
+ Timestamp ("1991-01-01" ),
1920
+ Timestamp ("1992-01-01" ),
1921
+ ],
1922
+ },
1923
+ {
1924
+ "a" : [0 , 1 , 2 ],
1925
+ "b" : [pd .Timedelta ("1 days" ), pd .Timedelta ("2 days" ), pd .NaT ],
1926
+ },
1927
+ {
1928
+ "a" : [0 , 1 , 2 ],
1929
+ "b" : [
1930
+ pd .Timedelta ("1 days" ),
1931
+ pd .Timedelta ("2 days" ),
1932
+ pd .Timedelta ("3 days" ),
1933
+ ],
1934
+ },
1935
+ ],
1936
+ )
1937
+ def test_df_cov_pd_nat (self , data ):
1938
+ # GH #53115
1939
+ df = DataFrame (data )
1940
+ with pytest .raises (TypeError , match = "not supported for cov" ):
1941
+ df .cov ()
1942
+
1910
1943
1911
1944
def test_sum_timedelta64_skipna_false ():
1912
1945
# GH#17235
0 commit comments