Skip to content

Commit

Permalink
Merge pull request #1132 from erwinmintiens/master
Browse files Browse the repository at this point in the history
Added plurals tests for DutchLocale
  • Loading branch information
krisfremen authored Oct 19, 2022
2 parents 58fc204 + 9c5f0ce commit 998b33b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,26 @@ def test_ordinal_number(self):
assert self.locale.ordinal_number(100) == "100번째"


@pytest.mark.usefixtures("lang_locale")
class TestDutchLocale:
def test_plurals(self):
assert self.locale._format_timeframe("now", 0) == "nu"
assert self.locale._format_timeframe("second", 1) == "een seconde"
assert self.locale._format_timeframe("seconds", 30) == "30 seconden"
assert self.locale._format_timeframe("minute", 1) == "een minuut"
assert self.locale._format_timeframe("minutes", 40) == "40 minuten"
assert self.locale._format_timeframe("hour", 1) == "een uur"
assert self.locale._format_timeframe("hours", 23) == "23 uur"
assert self.locale._format_timeframe("day", 1) == "een dag"
assert self.locale._format_timeframe("days", 12) == "12 dagen"
assert self.locale._format_timeframe("week", 1) == "een week"
assert self.locale._format_timeframe("weeks", 38) == "38 weken"
assert self.locale._format_timeframe("month", 1) == "een maand"
assert self.locale._format_timeframe("months", 11) == "11 maanden"
assert self.locale._format_timeframe("year", 1) == "een jaar"
assert self.locale._format_timeframe("years", 12) == "12 jaar"


@pytest.mark.usefixtures("lang_locale")
class TestJapaneseLocale:
def test_format_timeframe(self):
Expand Down

0 comments on commit 998b33b

Please sign in to comment.