From fbe937e97150191b8fdf088a84a97145f2685cf9 Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Sun, 25 Jun 2023 18:00:56 +0300 Subject: [PATCH 1/2] Migrate Madagascar to holiday groups, add l10n support --- README.rst | 2 +- holidays/countries/madagascar.py | 78 +++++--- holidays/locale/en_US/LC_MESSAGES/MG.po | 97 ++++++++++ holidays/locale/mg/LC_MESSAGES/MG.po | 97 ++++++++++ holidays/locale/uk/LC_MESSAGES/MG.po | 98 ++++++++++ tests/countries/test_madagascar.py | 229 ++++++++++++++++++------ 6 files changed, 516 insertions(+), 85 deletions(-) create mode 100644 holidays/locale/en_US/LC_MESSAGES/MG.po create mode 100644 holidays/locale/mg/LC_MESSAGES/MG.po create mode 100644 holidays/locale/uk/LC_MESSAGES/MG.po diff --git a/README.rst b/README.rst index d0ae3e5f2..cf612f502 100644 --- a/README.rst +++ b/README.rst @@ -428,7 +428,7 @@ The list of supported countries, their subdivisions and supported languages * - Madagascar - MG - - - + - en_US, **mg**, uk * - Malawi - MW - diff --git a/holidays/countries/madagascar.py b/holidays/countries/madagascar.py index 21403dad6..f2504a1b7 100644 --- a/holidays/countries/madagascar.py +++ b/holidays/countries/madagascar.py @@ -9,23 +9,29 @@ # Website: https://github.com/dr-prodigy/python-holidays # License: MIT (see LICENSE file) -from datetime import date from datetime import timedelta as td - -from dateutil.easter import easter +from gettext import gettext as tr from holidays.calendars import _get_nth_weekday_of_month -from holidays.constants import JAN, MAR, MAY, JUN, AUG, NOV, DEC, SUN +from holidays.constants import MAR, MAY, JUN, DEC, SUN from holidays.holiday_base import HolidayBase +from holidays.holiday_groups import ChristianHolidays, InternationalHolidays -class Madagascar(HolidayBase): +class Madagascar(HolidayBase, ChristianHolidays, InternationalHolidays): """ https://www.officeholidays.com/countries/madagascar https://www.timeanddate.com/holidays/madagascar/ """ country = "MG" + default_language = "mg" + supported_languages = ("en_US", "mg", "uk") + + def __init__(self, *args, **kwargs): + ChristianHolidays.__init__(self) + InternationalHolidays.__init__(self) + super().__init__(*args, **kwargs) def _populate(self, year): # Observed since 1947 @@ -34,40 +40,58 @@ def _populate(self, year): super()._populate(year) - self[date(year, JAN, 1)] = "Taom-baovao / New Year's Day" - self[date(year, MAR, 8)] = "Fetin'ny vehivavy / Women's Day" - self[date(year, MAR, 29)] = "Fetin'ny mahery fo / Martyrs' Day" - self[date(year, MAY, 1)] = "Labour Day" - self[_get_nth_weekday_of_month(3, SUN, JUN, year)] = "Fetin'ny ray / Father's Day" + # New Year's Day. + self._add_new_years_day(tr("Taom-baovao")) - if year >= 1960: - self[date(year, JUN, 26)] = "Independence Day" + # Women's Day. + self._add_womens_day(tr("Fetin'ny vehivavy")) - self[date(year, AUG, 15)] = "Fiakaran'ny Masina Maria tany an-danitra / Assumption Day" + # Martyrs' Day. + self._add_holiday(tr("Fetin'ny mahery fo"), MAR, 29) - self[date(year, NOV, 1)] = "Fetin'ny olo-masina / All Saints' Day" + # Easter Sunday. + self._add_easter_sunday(tr("Fetin'ny paska")) - if year >= 2011: - self[date(year, DEC, 11)] = "Republic Day" + # Easter Monday. + self._add_easter_monday(tr("Alatsinain'ny paska")) - self[date(year, DEC, 25)] = "Fetin'ny noely / Christmas Day" + # Labor Day. + self._add_labor_day(tr("Fetin'ny asa")) - easter_date = easter(year) - self[easter_date] = "Fetin'ny paska / Easter Sunday" - self[easter_date + td(days=+1)] = "Alatsinain'ny paska / Easter Monday" - self[ - easter_date + td(days=+39) - ] = "Fiakaran'ny Jesosy kristy tany an-danitra / Ascension Day" + # Ascension Day. + self._add_ascension_thursday(tr("Fiakaran'ny Jesosy kristy tany an-danitra")) - whit_sunday = easter_date + td(days=+49) - self[whit_sunday] = "Pentekosta / Whit Sunday" + # Whit Sunday. + whit_sunday = self._add_whit_sunday(tr("Pentekosta")) - self[easter_date + td(days=+50)] = "Alatsinain'ny pentekosta / Whit Monday" + # Whit Monday. + self._add_whit_monday(tr("Alatsinain'ny pentekosta")) dt = _get_nth_weekday_of_month(-1, SUN, MAY, year) if dt == whit_sunday: dt += td(days=+7) - self[dt] = "Fetin'ny Reny / Mother's Day" + # Mother's Day. + self._add_holiday(tr("Fetin'ny reny"), dt) + + # Father's Day. + self._add_holiday(tr("Fetin'ny ray"), _get_nth_weekday_of_month(3, SUN, JUN, year)) + + if year >= 1960: + # Independence Day. + self._add_holiday(tr("Fetin'ny fahaleovantena"), JUN, 26) + + # Assumption Day. + self._add_assumption_of_mary_day(tr("Fiakaran'ny Masina Maria tany an-danitra")) + + # All Saints' Day. + self._add_all_saints_day(tr("Fetin'ny olo-masina")) + + if year >= 2011: + # Republic Day. + self._add_holiday(tr("Fetin'ny Repoblika"), DEC, 11) + + # Christmas Day. + self._add_christmas_day(tr("Fetin'ny noely")) class MG(Madagascar): diff --git a/holidays/locale/en_US/LC_MESSAGES/MG.po b/holidays/locale/en_US/LC_MESSAGES/MG.po new file mode 100644 index 000000000..ce211c358 --- /dev/null +++ b/holidays/locale/en_US/LC_MESSAGES/MG.po @@ -0,0 +1,97 @@ +# Madagascar holidays en_US localization. +# Authors: ~Jhellico , (c) 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: Python Holidays 0.28\n" +"POT-Creation-Date: 2023-06-25 17:39+0300\n" +"PO-Revision-Date: 2023-06-25 17:45+0300\n" +"Last-Translator: ~Jhellico \n" +"Language-Team: Python Holidays localization team\n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Generated-By: pygettext.py 1.5\n" +"X-Generator: Poedit 3.2.2\n" + +#. New Year's Day. +#: holidays/countries/madagascar.py:44 +msgid "Taom-baovao" +msgstr "New Year's Day" + +#. Women's Day. +#: holidays/countries/madagascar.py:47 +msgid "Fetin'ny vehivavy" +msgstr "Women's Day" + +#. Martyrs' Day. +#: holidays/countries/madagascar.py:50 +msgid "Fetin'ny mahery fo" +msgstr "Martyrs' Day" + +#. Easter Sunday. +#: holidays/countries/madagascar.py:53 +msgid "Fetin'ny paska" +msgstr "Easter Sunday" + +#. Easter Monday. +#: holidays/countries/madagascar.py:56 +msgid "Alatsinain'ny paska" +msgstr "Easter Monday" + +#. Labor Day. +#: holidays/countries/madagascar.py:59 +msgid "Fetin'ny asa" +msgstr "Labor Day" + +#. Ascension Day. +#: holidays/countries/madagascar.py:62 +msgid "Fiakaran'ny Jesosy kristy tany an-danitra" +msgstr "Ascension Day" + +#. Whit Sunday. +#: holidays/countries/madagascar.py:65 +msgid "Pentekosta" +msgstr "Whit Sunday" + +#. Whit Monday. +#: holidays/countries/madagascar.py:68 +msgid "Alatsinain'ny pentekosta" +msgstr "Whit Monday" + +#. Mother's Day. +#: holidays/countries/madagascar.py:74 +msgid "Fetin'ny reny" +msgstr "Mother's Day" + +#. Father's Day. +#: holidays/countries/madagascar.py:77 +msgid "Fetin'ny ray" +msgstr "Father's Day" + +#. Independence Day. +#: holidays/countries/madagascar.py:81 +msgid "Fetin'ny fahaleovantena" +msgstr "Independence Day" + +#. Assumption Day. +#: holidays/countries/madagascar.py:84 +msgid "Fiakaran'ny Masina Maria tany an-danitra" +msgstr "Assumption Day" + +#. All Saints' Day. +#: holidays/countries/madagascar.py:87 +msgid "Fetin'ny olo-masina" +msgstr "All Saints' Day" + +#. Republic Day. +#: holidays/countries/madagascar.py:91 +msgid "Fetin'ny Repoblika" +msgstr "Republic Day" + +#. Christmas Day. +#: holidays/countries/madagascar.py:94 +msgid "Fetin'ny noely" +msgstr "Christmas Day" diff --git a/holidays/locale/mg/LC_MESSAGES/MG.po b/holidays/locale/mg/LC_MESSAGES/MG.po new file mode 100644 index 000000000..397202bac --- /dev/null +++ b/holidays/locale/mg/LC_MESSAGES/MG.po @@ -0,0 +1,97 @@ +# Madagascar holidays. +# Authors: ~Jhellico , (c) 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: Python Holidays 0.28\n" +"POT-Creation-Date: 2023-06-25 17:39+0300\n" +"PO-Revision-Date: 2023-06-25 17:40+0300\n" +"Last-Translator: ~Jhellico \n" +"Language-Team: Python Holidays localization team\n" +"Language: mg\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Generated-By: pygettext.py 1.5\n" +"X-Generator: Poedit 3.2.2\n" + +#. New Year's Day. +#: holidays/countries/madagascar.py:44 +msgid "Taom-baovao" +msgstr "" + +#. Women's Day. +#: holidays/countries/madagascar.py:47 +msgid "Fetin'ny vehivavy" +msgstr "" + +#. Martyrs' Day. +#: holidays/countries/madagascar.py:50 +msgid "Fetin'ny mahery fo" +msgstr "" + +#. Easter Sunday. +#: holidays/countries/madagascar.py:53 +msgid "Fetin'ny paska" +msgstr "" + +#. Easter Monday. +#: holidays/countries/madagascar.py:56 +msgid "Alatsinain'ny paska" +msgstr "" + +#. Labor Day. +#: holidays/countries/madagascar.py:59 +msgid "Fetin'ny asa" +msgstr "" + +#. Ascension Day. +#: holidays/countries/madagascar.py:62 +msgid "Fiakaran'ny Jesosy kristy tany an-danitra" +msgstr "" + +#. Whit Sunday. +#: holidays/countries/madagascar.py:65 +msgid "Pentekosta" +msgstr "" + +#. Whit Monday. +#: holidays/countries/madagascar.py:68 +msgid "Alatsinain'ny pentekosta" +msgstr "" + +#. Mother's Day. +#: holidays/countries/madagascar.py:74 +msgid "Fetin'ny reny" +msgstr "" + +#. Father's Day. +#: holidays/countries/madagascar.py:77 +msgid "Fetin'ny ray" +msgstr "" + +#. Independence Day. +#: holidays/countries/madagascar.py:81 +msgid "Fetin'ny fahaleovantena" +msgstr "" + +#. Assumption Day. +#: holidays/countries/madagascar.py:84 +msgid "Fiakaran'ny Masina Maria tany an-danitra" +msgstr "" + +#. All Saints' Day. +#: holidays/countries/madagascar.py:87 +msgid "Fetin'ny olo-masina" +msgstr "" + +#. Republic Day. +#: holidays/countries/madagascar.py:91 +msgid "Fetin'ny Repoblika" +msgstr "" + +#. Christmas Day. +#: holidays/countries/madagascar.py:94 +msgid "Fetin'ny noely" +msgstr "" diff --git a/holidays/locale/uk/LC_MESSAGES/MG.po b/holidays/locale/uk/LC_MESSAGES/MG.po new file mode 100644 index 000000000..e615bd17b --- /dev/null +++ b/holidays/locale/uk/LC_MESSAGES/MG.po @@ -0,0 +1,98 @@ +# Madagascar holidays uk localization. +# Authors: ~Jhellico , (c) 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: Python Holidays 0.28\n" +"POT-Creation-Date: 2023-06-25 17:39+0300\n" +"PO-Revision-Date: 2023-06-25 17:51+0300\n" +"Last-Translator: ~Jhellico \n" +"Language-Team: Python Holidays localization team\n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n" +"Generated-By: pygettext.py 1.5\n" +"X-Generator: Poedit 3.2.2\n" + +#. New Year's Day. +#: holidays/countries/madagascar.py:44 +msgid "Taom-baovao" +msgstr "Новий рік" + +#. Women's Day. +#: holidays/countries/madagascar.py:47 +msgid "Fetin'ny vehivavy" +msgstr "Жіночий день" + +#. Martyrs' Day. +#: holidays/countries/madagascar.py:50 +msgid "Fetin'ny mahery fo" +msgstr "День мучеників" + +#. Easter Sunday. +#: holidays/countries/madagascar.py:53 +msgid "Fetin'ny paska" +msgstr "Великдень" + +#. Easter Monday. +#: holidays/countries/madagascar.py:56 +msgid "Alatsinain'ny paska" +msgstr "Великодній понеділок" + +#. Labor Day. +#: holidays/countries/madagascar.py:59 +msgid "Fetin'ny asa" +msgstr "День праці" + +#. Ascension Day. +#: holidays/countries/madagascar.py:62 +msgid "Fiakaran'ny Jesosy kristy tany an-danitra" +msgstr "Вознесіння Господнє" + +#. Whit Sunday. +#: holidays/countries/madagascar.py:65 +msgid "Pentekosta" +msgstr "Трійця" + +#. Whit Monday. +#: holidays/countries/madagascar.py:68 +msgid "Alatsinain'ny pentekosta" +msgstr "День Святого Духа" + +#. Mother's Day. +#: holidays/countries/madagascar.py:74 +msgid "Fetin'ny reny" +msgstr "День матері" + +#. Father's Day. +#: holidays/countries/madagascar.py:77 +msgid "Fetin'ny ray" +msgstr "День батька" + +#. Independence Day. +#: holidays/countries/madagascar.py:81 +msgid "Fetin'ny fahaleovantena" +msgstr "День незалежності" + +#. Assumption Day. +#: holidays/countries/madagascar.py:84 +msgid "Fiakaran'ny Masina Maria tany an-danitra" +msgstr "Внебовзяття Пресвятої Діви Марії" + +#. All Saints' Day. +#: holidays/countries/madagascar.py:87 +msgid "Fetin'ny olo-masina" +msgstr "День усіх святих" + +#. Republic Day. +#: holidays/countries/madagascar.py:91 +msgid "Fetin'ny Repoblika" +msgstr "День республіки" + +#. Christmas Day. +#: holidays/countries/madagascar.py:94 +msgid "Fetin'ny noely" +msgstr "Різдво Христове" diff --git a/tests/countries/test_madagascar.py b/tests/countries/test_madagascar.py index 04cd21a4a..6e45e3595 100644 --- a/tests/countries/test_madagascar.py +++ b/tests/countries/test_madagascar.py @@ -9,79 +9,194 @@ # Website: https://github.com/dr-prodigy/python-holidays # License: MIT (see LICENSE file) -import unittest -from datetime import date +from holidays.countries.madagascar import Madagascar, MG, MDG +from tests.common import TestCase -import holidays +class TestMadagascar(TestCase): + @classmethod + def setUpClass(cls): + super().setUpClass(Madagascar, years=range(1947, 2050)) -class TestMadagascar(unittest.TestCase): - def setUp(self): - self.holidays = holidays.MG() + def test_country_aliases(self): + self.assertCountryAliases(Madagascar, MG, MDG) - def test_new_years(self): - self.assertIn(date(2010, 1, 1), self.holidays) - self.assertIn(date(2020, 1, 1), self.holidays) - - def test_mahery_fo(self): - self.assertIn(date(2010, 3, 29), self.holidays) - self.assertIn(date(2015, 3, 29), self.holidays) - self.assertIn(date(2022, 3, 29), self.holidays) + def test_no_holidays(self): + self.assertNoHolidays(Madagascar(years=1946)) - def test_paska(self): - self.assertIn(date(2022, 4, 17), self.holidays) # Andron'ny paska - self.assertIn(date(2022, 4, 18), self.holidays) # Alatsinain'ny Paska - self.assertIn(date(2022, 5, 26), self.holidays) - self.assertIn(date(2022, 6, 5), self.holidays) - self.assertIn(date(2022, 6, 6), self.holidays) + def test_new_years(self): + self.assertHoliday(f"{year}-01-01" for year in range(1947, 2050)) def test_womens_day(self): - self.assertIn(date(2010, 3, 8), self.holidays) - self.assertIn(date(2020, 3, 8), self.holidays) - - def test_labour_day(self): - self.assertIn(date(2010, 5, 1), self.holidays) - self.assertIn(date(2020, 5, 1), self.holidays) - - def test_mother_day(self): - self.assertIn(date(2010, 5, 30), self.holidays) - self.assertIn(date(2018, 5, 27), self.holidays) - self.assertIn(date(2020, 6, 7), self.holidays) - self.assertIn(date(2022, 5, 29), self.holidays) + self.assertHoliday(f"{year}-03-08" for year in range(1947, 2050)) + + def test_martyrs_day(self): + self.assertHoliday(f"{year}-03-29" for year in range(1947, 2050)) + + def test_easter_sunday(self): + self.assertHoliday( + "2019-04-21", + "2020-04-12", + "2021-04-04", + "2022-04-17", + "2023-04-09", + ) + + def test_easter_monday(self): + self.assertHoliday( + "2019-04-22", + "2020-04-13", + "2021-04-05", + "2022-04-18", + "2023-04-10", + ) + + def test_labor_day(self): + self.assertHoliday(f"{year}-05-01" for year in range(1947, 2050)) + + def test_ascension_day(self): + self.assertHoliday( + "2019-05-30", + "2020-05-21", + "2021-05-13", + "2022-05-26", + "2023-05-18", + ) + + def test_whit_sunday(self): + self.assertHoliday( + "2019-06-09", + "2020-05-31", + "2021-05-23", + "2022-06-05", + "2023-05-28", + ) + + def test_whit_monday(self): + self.assertHoliday( + "2019-06-10", + "2020-06-01", + "2021-05-24", + "2022-06-06", + "2023-05-29", + ) + + def test_mothers_day(self): + self.assertHoliday( + "2019-05-26", + "2020-06-07", + "2021-05-30", + "2022-05-29", + "2023-06-04", + ) def test_father_day(self): - self.assertIn(date(2010, 6, 20), self.holidays) - self.assertIn(date(2018, 6, 17), self.holidays) - self.assertIn(date(2020, 6, 21), self.holidays) - self.assertIn(date(2022, 6, 19), self.holidays) + self.assertHoliday( + "2019-06-16", + "2020-06-21", + "2021-06-20", + "2022-06-19", + "2023-06-18", + ) def test_independence_day(self): - self.assertIn(date(1960, 6, 26), self.holidays) - self.assertIn(date(2010, 6, 26), self.holidays) - self.assertIn(date(2020, 6, 26), self.holidays) - self.assertNotIn(date(1959, 6, 26), self.holidays) + self.assertHoliday(f"{year}-06-26" for year in range(1960, 2050)) + self.assertNoHoliday(f"{year}-06-26" for year in range(1947, 1960)) + self.assertNoHolidayName("Fetin'ny fahaleovantena", range(1947, 1960)) def test_assumption_day(self): - self.assertIn(date(2010, 8, 15), self.holidays) - self.assertIn(date(2020, 8, 15), self.holidays) - self.assertIn(date(2022, 8, 15), self.holidays) + self.assertHoliday(f"{year}-08-15" for year in range(1947, 2050)) def test_all_saints_day(self): - self.assertIn(date(2010, 11, 1), self.holidays) - self.assertIn(date(2020, 11, 1), self.holidays) - self.assertIn(date(2022, 11, 1), self.holidays) + self.assertHoliday(f"{year}-11-01" for year in range(1947, 2050)) def test_republic_day(self): - self.assertIn(date(2011, 12, 11), self.holidays) - self.assertIn(date(2020, 12, 11), self.holidays) - self.assertIn(date(2022, 12, 11), self.holidays) - self.assertNotIn(date(2010, 12, 11), self.holidays) + self.assertHoliday(f"{year}-12-11" for year in range(2011, 2050)) + self.assertNoHoliday(f"{year}-12-11" for year in range(1947, 2011)) + self.assertNoHolidayName("Fetin'ny Repoblika", range(1947, 2011)) def test_christmas_day(self): - self.assertIn(date(2010, 12, 25), self.holidays) - self.assertIn(date(2020, 12, 25), self.holidays) - self.assertIn(date(2022, 12, 25), self.holidays) - - def test_1946(self): - mg_holidays = holidays.MG(years=1946) - self.assertEqual(0, len(mg_holidays)) + self.assertHoliday(f"{year}-12-25" for year in range(1947, 2050)) + + def test_2021(self): + self.assertHolidayDates( + Madagascar(years=2021), + "2021-01-01", + "2021-03-08", + "2021-03-29", + "2021-04-04", + "2021-04-05", + "2021-05-01", + "2021-05-13", + "2021-05-23", + "2021-05-24", + "2021-05-30", + "2021-06-20", + "2021-06-26", + "2021-08-15", + "2021-11-01", + "2021-12-11", + "2021-12-25", + ) + + def test_l10n_default(self): + self.assertLocalizedHolidays( + ("2022-01-01", "Taom-baovao"), + ("2022-03-08", "Fetin'ny vehivavy"), + ("2022-03-29", "Fetin'ny mahery fo"), + ("2022-04-17", "Fetin'ny paska"), + ("2022-04-18", "Alatsinain'ny paska"), + ("2022-05-01", "Fetin'ny asa"), + ("2022-05-26", "Fiakaran'ny Jesosy kristy tany an-danitra"), + ("2022-05-29", "Fetin'ny reny"), + ("2022-06-05", "Pentekosta"), + ("2022-06-06", "Alatsinain'ny pentekosta"), + ("2022-06-19", "Fetin'ny ray"), + ("2022-06-26", "Fetin'ny fahaleovantena"), + ("2022-08-15", "Fiakaran'ny Masina Maria tany an-danitra"), + ("2022-11-01", "Fetin'ny olo-masina"), + ("2022-12-11", "Fetin'ny Repoblika"), + ("2022-12-25", "Fetin'ny noely"), + ) + + def test_l10n_en_us(self): + self.assertLocalizedHolidays( + "en_US", + ("2022-01-01", "New Year's Day"), + ("2022-03-08", "Women's Day"), + ("2022-03-29", "Martyrs' Day"), + ("2022-04-17", "Easter Sunday"), + ("2022-04-18", "Easter Monday"), + ("2022-05-01", "Labor Day"), + ("2022-05-26", "Ascension Day"), + ("2022-05-29", "Mother's Day"), + ("2022-06-05", "Whit Sunday"), + ("2022-06-06", "Whit Monday"), + ("2022-06-19", "Father's Day"), + ("2022-06-26", "Independence Day"), + ("2022-08-15", "Assumption Day"), + ("2022-11-01", "All Saints' Day"), + ("2022-12-11", "Republic Day"), + ("2022-12-25", "Christmas Day"), + ) + + def test_l10n_uk(self): + self.assertLocalizedHolidays( + "uk", + ("2022-01-01", "Новий рік"), + ("2022-03-08", "Жіночий день"), + ("2022-03-29", "День мучеників"), + ("2022-04-17", "Великдень"), + ("2022-04-18", "Великодній понеділок"), + ("2022-05-01", "День праці"), + ("2022-05-26", "Вознесіння Господнє"), + ("2022-05-29", "День матері"), + ("2022-06-05", "Трійця"), + ("2022-06-06", "День Святого Духа"), + ("2022-06-19", "День батька"), + ("2022-06-26", "День незалежності"), + ("2022-08-15", "Внебовзяття Пресвятої Діви Марії"), + ("2022-11-01", "День усіх святих"), + ("2022-12-11", "День республіки"), + ("2022-12-25", "Різдво Христове"), + ) From a5339659de5f84dccdcdbc21a6424fee52b8fbbf Mon Sep 17 00:00:00 2001 From: ~Jhellico Date: Wed, 28 Jun 2023 14:32:32 +0300 Subject: [PATCH 2/2] PR suggestion Co-authored-by: Arkadii Yakovets --- tests/countries/test_madagascar.py | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/countries/test_madagascar.py b/tests/countries/test_madagascar.py index 6e45e3595..c97ce6a97 100644 --- a/tests/countries/test_madagascar.py +++ b/tests/countries/test_madagascar.py @@ -119,24 +119,24 @@ def test_christmas_day(self): self.assertHoliday(f"{year}-12-25" for year in range(1947, 2050)) def test_2021(self): - self.assertHolidayDates( + self.assertHolidays( Madagascar(years=2021), - "2021-01-01", - "2021-03-08", - "2021-03-29", - "2021-04-04", - "2021-04-05", - "2021-05-01", - "2021-05-13", - "2021-05-23", - "2021-05-24", - "2021-05-30", - "2021-06-20", - "2021-06-26", - "2021-08-15", - "2021-11-01", - "2021-12-11", - "2021-12-25", + ("2021-01-01", "Taom-baovao"), + ("2021-03-08", "Fetin'ny vehivavy"), + ("2021-03-29", "Fetin'ny mahery fo"), + ("2021-04-04", "Fetin'ny paska"), + ("2021-04-05", "Alatsinain'ny paska"), + ("2021-05-01", "Fetin'ny asa"), + ("2021-05-13", "Fiakaran'ny Jesosy kristy tany an-danitra"), + ("2021-05-23", "Pentekosta"), + ("2021-05-24", "Alatsinain'ny pentekosta"), + ("2021-05-30", "Fetin'ny reny"), + ("2021-06-20", "Fetin'ny ray"), + ("2021-06-26", "Fetin'ny fahaleovantena"), + ("2021-08-15", "Fiakaran'ny Masina Maria tany an-danitra"), + ("2021-11-01", "Fetin'ny olo-masina"), + ("2021-12-11", "Fetin'ny Repoblika"), + ("2021-12-25", "Fetin'ny noely"), ) def test_l10n_default(self):