@@ -360,12 +360,6 @@ def test_holiday_with_exclusion():
360
360
start = Timestamp ("2020-05-01" )
361
361
end = Timestamp ("2025-05-31" )
362
362
exclude = DatetimeIndex ([Timestamp ("2022-05-30" )]) # Queen's platinum Jubilee
363
- default_uk_spring_bank_holiday : Holiday = Holiday (
364
- "UK Spring Bank Holiday" ,
365
- month = 5 ,
366
- day = 31 ,
367
- offset = DateOffset (weekday = MO (- 1 )),
368
- )
369
363
370
364
queens_jubilee_uk_spring_bank_holiday : Holiday = Holiday (
371
365
"Queen's Jubilee UK Spring Bank Holiday" ,
@@ -375,13 +369,6 @@ def test_holiday_with_exclusion():
375
369
exclude_dates = exclude ,
376
370
)
377
371
378
- original_dates = default_uk_spring_bank_holiday .dates (start , end )
379
- actual_dates = queens_jubilee_uk_spring_bank_holiday .dates (start , end )
380
-
381
- assert exclude .isin (original_dates ).all ()
382
- assert ~ exclude .isin (actual_dates ).all ()
383
- assert actual_dates .isin (original_dates ).all ()
384
-
385
372
result = queens_jubilee_uk_spring_bank_holiday .dates (start , end )
386
373
expected = DatetimeIndex (
387
374
[
@@ -406,23 +393,11 @@ def test_holiday_with_multiple_exclusions():
406
393
Timestamp ("2061-01-01" ),
407
394
]
408
395
) # Yakudoshi new year
409
- default_japan_new_year : Holiday = Holiday (
410
- "Japan New Year" ,
411
- month = 1 ,
412
- day = 1 ,
413
- )
414
396
415
397
yakudoshi_new_year : Holiday = Holiday (
416
398
"Yakudoshi New Year" , month = 1 , day = 1 , exclude_dates = exclude
417
399
)
418
400
419
- original_dates = default_japan_new_year .dates (start , end )
420
- actual_dates = yakudoshi_new_year .dates (start , end )
421
-
422
- assert exclude .isin (original_dates ).all ()
423
- assert ~ exclude .isin (actual_dates ).all ()
424
- assert actual_dates .isin (original_dates ).all ()
425
-
426
401
result = yakudoshi_new_year .dates (start , end )
427
402
expected = DatetimeIndex (
428
403
[
0 commit comments