Skip to content

Commit a29e232

Browse files
author
David Hirschfeld
committed
Add test for no-holidays calendar
Test for issue #31415
1 parent d4c37f5 commit a29e232

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pandas/tests/tseries/holiday/test_calendar.py

+12
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,15 @@ class testCalendar(AbstractHolidayCalendar):
9898
Sat_before_Labor_Day_2031 = to_datetime("2031-08-30")
9999
next_working_day = Sat_before_Labor_Day_2031 + 0 * workDay
100100
assert next_working_day == to_datetime("2031-09-02")
101+
102+
103+
def test_no_holidays_calendar():
104+
class NoHolidaysCalendar(AbstractHolidayCalendar):
105+
pass
106+
107+
cal = NoHolidaysCalendar()
108+
holidays = cal.holidays(
109+
Timestamp("01-Jan-2020"),
110+
Timestamp("01-Jan-2021")
111+
)
112+
assert holidays.empty

0 commit comments

Comments
 (0)