MCPcopy
hub / github.com/vacanza/holidays / assertLocalizedHolidays

Method assertLocalizedHolidays

tests/common.py:629–642  ·  view source on GitHub ↗

Assert localized holidays match expected names.

(self, *args, categories=None)

Source from the content-addressed store, hash-verified

627 )
628
629 def assertLocalizedHolidays(self, *args, categories=None):
630 """Assert localized holidays match expected names."""
631 arg = args[0]
632 is_string = isinstance(arg, str)
633
634 language = arg if is_string else None
635 localized_holidays = args[1:] if is_string else args
636
637 if language:
638 self.set_language(language)
639 for language in (language, "invalid", ""):
640 self._assertLocalizedHolidays(
641 localized_holidays, categories=categories, language=language
642 )
643
644
645class CommonTests(TestCase):

Callers 15

test_l10n_defaultMethod · 0.80
test_l10n_en_usMethod · 0.80
test_l10n_frMethod · 0.80
test_l10n_defaultMethod · 0.80
test_l10n_en_usMethod · 0.80
test_l10n_thMethod · 0.80
test_l10n_ukMethod · 0.80
test_l10n_defaultMethod · 0.80
test_l10n_en_usMethod · 0.80
test_l10n_ukMethod · 0.80
test_l10n_defaultMethod · 0.80
test_l10n_arMethod · 0.80

Calls 2

set_languageMethod · 0.95

Tested by 15

test_l10n_defaultMethod · 0.64
test_l10n_en_usMethod · 0.64
test_l10n_frMethod · 0.64
test_l10n_defaultMethod · 0.64
test_l10n_en_usMethod · 0.64
test_l10n_thMethod · 0.64
test_l10n_ukMethod · 0.64
test_l10n_defaultMethod · 0.64
test_l10n_en_usMethod · 0.64
test_l10n_ukMethod · 0.64
test_l10n_defaultMethod · 0.64
test_l10n_arMethod · 0.64