MCPcopy
hub / github.com/django/django / test_basque_date_formats

Method test_basque_date_formats

tests/i18n/tests.py:1182–1200  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1180 self.assertEqual(expected, format_function(*format_args))
1181
1182 def test_basque_date_formats(self):
1183 # Basque locale uses parenthetical suffixes for conditional declension:
1184 # (e)ko for years and declined month/day forms.
1185 with translation.override("eu", deactivate=True):
1186 self.assertEqual(date_format(self.d), "2009(e)ko abe.k 31")
1187 self.assertEqual(
1188 date_format(self.dt, "DATETIME_FORMAT"),
1189 "2009(e)ko abe.k 31, 20:50",
1190 )
1191 self.assertEqual(
1192 date_format(self.d, "YEAR_MONTH_FORMAT"), "2009(e)ko abendua"
1193 )
1194 self.assertEqual(date_format(self.d, "MONTH_DAY_FORMAT"), "abenduaren 31a")
1195 # Day 11 (hamaika in Basque) ends in 'a' as a word, but the
1196 # numeral form does not, so appending 'a' is correct here.
1197 self.assertEqual(
1198 date_format(datetime.date(2009, 12, 11), "MONTH_DAY_FORMAT"),
1199 "abenduaren 11a",
1200 )
1201
1202 def test_sub_locales(self):
1203 """

Callers

nothing calls this directly

Calls 1

date_formatFunction · 0.90

Tested by

no test coverage detected