A PyQT GUI application for converting InfoLease report outputs into Excel files. Handles parsing and summarizing. Learns where files are meant to be store and compiles monthly and yearly summaries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InfoLeaseExtract/venv/Lib/site-packages/pandas/tests/tseries/holiday/test_federal.py

38 lines
1.1 KiB

from datetime import datetime
from pandas.tseries.holiday import (
AbstractHolidayCalendar,
USMartinLutherKingJr,
USMemorialDay,
)
def test_no_mlk_before_1986():
# see gh-10278
class MLKCalendar(AbstractHolidayCalendar):
rules = [USMartinLutherKingJr]
holidays = MLKCalendar().holidays(start="1984", end="1988").to_pydatetime().tolist()
# Testing to make sure holiday is not incorrectly observed before 1986.
assert holidays == [datetime(1986, 1, 20, 0, 0), datetime(1987, 1, 19, 0, 0)]
def test_memorial_day():
class MemorialDay(AbstractHolidayCalendar):
rules = [USMemorialDay]
holidays = MemorialDay().holidays(start="1971", end="1980").to_pydatetime().tolist()
# Fixes 5/31 error and checked manually against Wikipedia.
assert holidays == [
datetime(1971, 5, 31, 0, 0),
datetime(1972, 5, 29, 0, 0),
datetime(1973, 5, 28, 0, 0),
datetime(1974, 5, 27, 0, 0),
datetime(1975, 5, 26, 0, 0),
datetime(1976, 5, 31, 0, 0),
datetime(1977, 5, 30, 0, 0),
datetime(1978, 5, 29, 0, 0),
datetime(1979, 5, 28, 0, 0),
]