Skip to content

Commit 8c26ab9

Browse files
committed
wip
1 parent 8c806e6 commit 8c26ab9

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

pandas/tests/io/parser/test_parse_dates.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,13 @@ def test_yy_format_with_year_first(all_parsers, parse_dates):
844844
090331,0830,5,6
845845
"""
846846
parser = all_parsers
847-
result = parser.read_csv(StringIO(data), index_col=0, parse_dates=parse_dates)
847+
result = parser.read_csv_check_warnings(
848+
UserWarning,
849+
"without a format specified",
850+
StringIO(data),
851+
index_col=0,
852+
parse_dates=parse_dates,
853+
)
848854
index = DatetimeIndex(
849855
[
850856
datetime(2009, 1, 31, 0, 10, 0),

pandas/tests/tseries/holiday/test_calendar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def __init__(self, name=None, rules=None) -> None:
5757
jan2 = TestCalendar(rules=[Holiday("jan2", year=2015, month=1, day=2)])
5858

5959
# Getting holidays for Jan 1 should not alter results for Jan 2.
60-
tm.assert_index_equal(jan1.holidays(), DatetimeIndex(["01-Jan-2015"]))
61-
tm.assert_index_equal(jan2.holidays(), DatetimeIndex(["02-Jan-2015"]))
60+
tm.assert_index_equal(jan1.holidays(), DatetimeIndex(["2015-01-01"]))
61+
tm.assert_index_equal(jan2.holidays(), DatetimeIndex(["2015-01-02"]))
6262

6363

6464
def test_calendar_observance_dates():
@@ -111,6 +111,6 @@ class NoHolidaysCalendar(AbstractHolidayCalendar):
111111
pass
112112

113113
cal = NoHolidaysCalendar()
114-
holidays = cal.holidays(Timestamp("01-Jan-2020"), Timestamp("01-Jan-2021"))
114+
holidays = cal.holidays(Timestamp("01/01/2020"), Timestamp("01/01/2021"))
115115
empty_index = DatetimeIndex([]) # Type is DatetimeIndex since return_name=False
116116
tm.assert_index_equal(holidays, empty_index)

pandas/tests/tseries/offsets/test_dst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_springforward_singular(self):
165165
QuarterEnd: ["11/2/2012", "12/31/2012"],
166166
BQuarterBegin: ["11/2/2012", "12/3/2012"],
167167
BQuarterEnd: ["11/2/2012", "12/31/2012"],
168-
Day: ["11/4/2012", "11/4/2012 23:00"],
168+
Day: ["11/4/2012", "2012-11-04 23:00"],
169169
}.items()
170170

171171
@pytest.mark.parametrize("tup", offset_classes)

pandas/tests/tslibs/test_parsing.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,9 @@ def test_guess_datetime_format_with_locale_specific_formats(string, fmt):
214214
UserWarning,
215215
"Parsing datetime strings without a format specified",
216216
),
217-
("1/1/1/1", UserWarning, "Parsing datetime strings without a format specified"),
218-
(
219-
"this_is_not_a_datetime",
220-
UserWarning,
221-
"Parsing datetime strings without a format specified",
222-
),
223-
("51a", UserWarning, "Parsing datetime strings without a format specified"),
217+
("1/1/1/1", None, ""),
218+
("this_is_not_a_datetime", None, ""),
219+
("51a", None, ""),
224220
(9, None, ""),
225221
(datetime(2011, 1, 1), None, ""),
226222
],

0 commit comments

Comments
 (0)