@@ -325,3 +325,64 @@ def test_check_date():
325
325
)
326
326
def test_calc_easter (date ):
327
327
assert dates .calc_easter (date .year ) == date
328
+
329
+
330
+ @pytest .mark .parametrize (
331
+ "the_date, result" ,
332
+ [
333
+ (date (month = 3 , day = 2 , year = 2019 ), False ),
334
+ (date (month = 4 , day = 7 , year = 2020 ), True ),
335
+ (date (month = 8 , day = 17 , year = 2015 ), True ),
336
+ (date (month = 12 , day = 25 , year = 2030 ), False ),
337
+ (date (month = 3 , day = 29 , year = 2019 ), False ),
338
+ (date (month = 3 , day = 30 , year = 2019 ), False ),
339
+ (date (month = 3 , day = 31 , year = 2019 ), True ),
340
+ (date (month = 4 , day = 1 , year = 2019 ), True ),
341
+ (date (month = 10 , day = 25 , year = 2019 ), True ),
342
+ (date (month = 10 , day = 26 , year = 2019 ), True ),
343
+ (date (month = 10 , day = 27 , year = 2019 ), False ),
344
+ (date (month = 10 , day = 28 , year = 2019 ), False ),
345
+ (date (month = 3 , day = 27 , year = 2020 ), False ),
346
+ (date (month = 3 , day = 28 , year = 2020 ), False ),
347
+ (date (month = 3 , day = 29 , year = 2020 ), True ),
348
+ (date (month = 3 , day = 30 , year = 2020 ), True ),
349
+ (date (month = 10 , day = 23 , year = 2020 ), True ),
350
+ (date (month = 10 , day = 24 , year = 2020 ), True ),
351
+ (date (month = 10 , day = 25 , year = 2020 ), False ),
352
+ (date (month = 10 , day = 26 , year = 2020 ), False ),
353
+ (date (month = 3 , day = 26 , year = 2021 ), False ),
354
+ (date (month = 3 , day = 27 , year = 2021 ), False ),
355
+ (date (month = 3 , day = 28 , year = 2021 ), True ),
356
+ (date (month = 3 , day = 29 , year = 2021 ), True ),
357
+ (date (month = 10 , day = 29 , year = 2021 ), True ),
358
+ (date (month = 10 , day = 30 , year = 2021 ), True ),
359
+ (date (month = 10 , day = 31 , year = 2021 ), False ),
360
+ (date (month = 11 , day = 1 , year = 2021 ), False ),
361
+ (date (month = 3 , day = 25 , year = 2022 ), False ),
362
+ (date (month = 3 , day = 26 , year = 2022 ), False ),
363
+ (date (month = 3 , day = 27 , year = 2022 ), True ),
364
+ (date (month = 3 , day = 28 , year = 2022 ), True ),
365
+ (date (month = 10 , day = 28 , year = 2022 ), True ),
366
+ (date (month = 10 , day = 29 , year = 2022 ), True ),
367
+ (date (month = 10 , day = 30 , year = 2022 ), False ),
368
+ (date (month = 10 , day = 31 , year = 2022 ), False ),
369
+ (date (month = 3 , day = 24 , year = 2023 ), False ),
370
+ (date (month = 3 , day = 25 , year = 2023 ), False ),
371
+ (date (month = 3 , day = 26 , year = 2023 ), True ),
372
+ (date (month = 3 , day = 27 , year = 2023 ), True ),
373
+ (date (month = 10 , day = 27 , year = 2023 ), True ),
374
+ (date (month = 10 , day = 28 , year = 2023 ), True ),
375
+ (date (month = 10 , day = 29 , year = 2023 ), False ),
376
+ (date (month = 10 , day = 30 , year = 2023 ), False ),
377
+ (date (month = 3 , day = 29 , year = 2024 ), False ),
378
+ (date (month = 3 , day = 30 , year = 2024 ), False ),
379
+ (date (month = 3 , day = 31 , year = 2024 ), True ),
380
+ (date (month = 4 , day = 1 , year = 2024 ), True ),
381
+ (date (month = 10 , day = 25 , year = 2024 ), True ),
382
+ (date (month = 10 , day = 26 , year = 2024 ), True ),
383
+ (date (month = 10 , day = 27 , year = 2024 ), False ),
384
+ (date (month = 10 , day = 28 , year = 2024 ), False ),
385
+ ]
386
+ )
387
+ def test_is_bst (the_date , result : bool ):
388
+ assert dates .is_bst (the_date ) is result
0 commit comments