@@ -518,7 +518,7 @@ def test_to_datetime_parse_tzname_or_tzoffset_utc_false_deprecated(
518
518
self , fmt , dates , expected_dates
519
519
):
520
520
# GH 13486, 50887
521
- msg = "parsing datetimes with mixed time zones will raise a warning "
521
+ msg = "parsing datetimes with mixed time zones will raise an error "
522
522
with tm .assert_produces_warning (FutureWarning , match = msg ):
523
523
result = to_datetime (dates , format = fmt )
524
524
expected = Index (expected_dates )
@@ -693,7 +693,7 @@ def test_to_datetime_mixed_datetime_and_string_with_format_mixed_offsets_utc_fal
693
693
args = ["2000-01-01 01:00:00" , "2000-01-01 02:00:00+00:00" ]
694
694
ts1 = constructor (args [0 ])
695
695
ts2 = args [1 ]
696
- msg = "parsing datetimes with mixed time zones will raise a warning "
696
+ msg = "parsing datetimes with mixed time zones will raise an error "
697
697
698
698
expected = Index (
699
699
[
@@ -734,7 +734,7 @@ def test_to_datetime_mixed_datetime_and_string_with_format_mixed_offsets_utc_fal
734
734
)
735
735
def test_to_datetime_mixed_offsets_with_none_tz (self , fmt , expected ):
736
736
# https://github.com/pandas-dev/pandas/issues/50071
737
- msg = "parsing datetimes with mixed time zones will raise a warning "
737
+ msg = "parsing datetimes with mixed time zones will raise an error "
738
738
739
739
with tm .assert_produces_warning (FutureWarning , match = msg ):
740
740
result = to_datetime (
@@ -1236,7 +1236,7 @@ def test_to_datetime_different_offsets(self, cache):
1236
1236
ts_string_2 = "March 1, 2018 12:00:00+0500"
1237
1237
arr = [ts_string_1 ] * 5 + [ts_string_2 ] * 5
1238
1238
expected = Index ([parse (x ) for x in arr ])
1239
- msg = "parsing datetimes with mixed time zones will raise a warning "
1239
+ msg = "parsing datetimes with mixed time zones will raise an error "
1240
1240
with tm .assert_produces_warning (FutureWarning , match = msg ):
1241
1241
result = to_datetime (arr , cache = cache )
1242
1242
tm .assert_index_equal (result , expected )
@@ -1604,7 +1604,7 @@ def test_to_datetime_coerce(self):
1604
1604
"March 1, 2018 12:00:00+0500" ,
1605
1605
"20100240" ,
1606
1606
]
1607
- msg = "parsing datetimes with mixed time zones will raise a warning "
1607
+ msg = "parsing datetimes with mixed time zones will raise an error "
1608
1608
with tm .assert_produces_warning (FutureWarning , match = msg ):
1609
1609
result = to_datetime (ts_strings , errors = "coerce" )
1610
1610
expected = Index (
@@ -1689,7 +1689,7 @@ def test_iso_8601_strings_with_same_offset(self):
1689
1689
def test_iso_8601_strings_with_different_offsets (self ):
1690
1690
# GH 17697, 11736, 50887
1691
1691
ts_strings = ["2015-11-18 15:30:00+05:30" , "2015-11-18 16:30:00+06:30" , NaT ]
1692
- msg = "parsing datetimes with mixed time zones will raise a warning "
1692
+ msg = "parsing datetimes with mixed time zones will raise an error "
1693
1693
with tm .assert_produces_warning (FutureWarning , match = msg ):
1694
1694
result = to_datetime (ts_strings )
1695
1695
expected = np .array (
@@ -1729,7 +1729,7 @@ def test_mixed_offsets_with_native_datetime_raises(self):
1729
1729
1730
1730
now = Timestamp ("now" )
1731
1731
today = Timestamp ("today" )
1732
- msg = "parsing datetimes with mixed time zones will raise a warning "
1732
+ msg = "parsing datetimes with mixed time zones will raise an error "
1733
1733
with tm .assert_produces_warning (FutureWarning , match = msg ):
1734
1734
mixed = to_datetime (ser )
1735
1735
expected = Series (
@@ -1810,7 +1810,7 @@ def test_to_datetime_fixed_offset(self):
1810
1810
)
1811
1811
def test_to_datetime_mixed_offsets_with_utc_false_deprecated (self , date ):
1812
1812
# GH 50887
1813
- msg = "parsing datetimes with mixed time zones will raise a warning "
1813
+ msg = "parsing datetimes with mixed time zones will raise an error "
1814
1814
with tm .assert_produces_warning (FutureWarning , match = msg ):
1815
1815
to_datetime (date , utc = False )
1816
1816
@@ -3680,7 +3680,7 @@ def test_to_datetime_with_empty_str_utc_false_format_mixed():
3680
3680
3681
3681
def test_to_datetime_with_empty_str_utc_false_offsets_and_format_mixed ():
3682
3682
# GH 50887
3683
- msg = "parsing datetimes with mixed time zones will raise a warning "
3683
+ msg = "parsing datetimes with mixed time zones will raise an error "
3684
3684
3685
3685
with tm .assert_produces_warning (FutureWarning , match = msg ):
3686
3686
to_datetime (
0 commit comments