@@ -909,39 +909,6 @@ def test_constructor_with_naive_string_and_datetimetz_dtype(self, arg):
909
909
expected = Series (pd .Timestamp (arg )).dt .tz_localize ('CET' )
910
910
assert_series_equal (result , expected )
911
911
912
- @pytest .mark .parametrize ("klass" , [
913
- Series ,
914
- lambda x , ** kwargs : DataFrame ({'a' : x }, ** kwargs )['a' ],
915
- pytest .param (lambda x , ** kwargs : DataFrame (x , ** kwargs )[0 ],
916
- marks = pytest .mark .xfail ),
917
- Index ,
918
- ])
919
- @pytest .mark .parametrize ("a" , [
920
- np .array (['2263-01-01' ], dtype = 'datetime64[D]' ),
921
- np .array ([datetime (2263 , 1 , 1 )], dtype = object ),
922
- np .array ([np .datetime64 ('2263-01-01' , 'D' )], dtype = object ),
923
- np .array (["2263-01-01" ], dtype = object )
924
- ], ids = ['datetime64[D]' , 'object-datetime.datetime' ,
925
- 'object-numpy-scalar' , 'object-string' ])
926
- def test_constructor_datetime_outofbound (self , a , klass ):
927
- # GH-26853 (+ bug GH-26206 out of bound non-ns unit)
928
-
929
- # No dtype specified (dtype inference)
930
- # datetime64[non-ns] raise error, other cases result in object dtype
931
- # and preserve original data
932
- if a .dtype .kind == 'M' :
933
- with pytest .raises (pd .errors .OutOfBoundsDatetime ):
934
- klass (a )
935
- else :
936
- result = klass (a )
937
- assert result .dtype == 'object'
938
- tm .assert_numpy_array_equal (result .to_numpy (), a )
939
-
940
- # Explicit dtype specified
941
- # Forced conversion fails for all -> all cases raise error
942
- with pytest .raises (pd .errors .OutOfBoundsDatetime ):
943
- klass (a , dtype = 'datetime64[ns]' )
944
-
945
912
def test_construction_interval (self ):
946
913
# construction from interval & array of intervals
947
914
index = IntervalIndex .from_breaks (np .arange (3 ), closed = 'right' )
0 commit comments