@@ -1157,7 +1157,7 @@ def test_unit(self, cache):
1157
1157
tm .assert_index_equal (result , expected )
1158
1158
1159
1159
msg = "cannot convert input 11111111 with the unit 'D'"
1160
- with pytest .raises (tslib . OutOfBoundsDatetime , match = msg ):
1160
+ with pytest .raises (OutOfBoundsDatetime , match = msg ):
1161
1161
to_datetime (values , unit = "D" , errors = "raise" , cache = cache )
1162
1162
1163
1163
values = [1420043460000 , iNaT , NaT , np .nan , "NaT" ]
@@ -1171,15 +1171,15 @@ def test_unit(self, cache):
1171
1171
tm .assert_index_equal (result , expected )
1172
1172
1173
1173
msg = "cannot convert input 1420043460000 with the unit 's'"
1174
- with pytest .raises (tslib . OutOfBoundsDatetime , match = msg ):
1174
+ with pytest .raises (OutOfBoundsDatetime , match = msg ):
1175
1175
to_datetime (values , errors = "raise" , unit = "s" , cache = cache )
1176
1176
1177
1177
# if we have a string, then we raise a ValueError
1178
1178
# and NOT an OutOfBoundsDatetime
1179
1179
for val in ["foo" , Timestamp ("20130101" )]:
1180
1180
try :
1181
1181
to_datetime (val , errors = "raise" , unit = "s" , cache = cache )
1182
- except tslib . OutOfBoundsDatetime as err :
1182
+ except OutOfBoundsDatetime as err :
1183
1183
raise AssertionError ("incorrect exception raised" ) from err
1184
1184
except ValueError :
1185
1185
pass
@@ -2347,7 +2347,7 @@ def test_epoch(self, units, epochs, epoch_1960, units_from_epochs):
2347
2347
("random_string" , ValueError ),
2348
2348
("epoch" , ValueError ),
2349
2349
("13-24-1990" , ValueError ),
2350
- (datetime (1 , 1 , 1 ), tslib . OutOfBoundsDatetime ),
2350
+ (datetime (1 , 1 , 1 ), OutOfBoundsDatetime ),
2351
2351
],
2352
2352
)
2353
2353
def test_invalid_origins (self , origin , exc , units , units_from_epochs ):
0 commit comments