File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ def test_i18n() -> None:
2424 assert humanize .precisedelta (one_min_three_seconds ) == "1 minute and 7 seconds"
2525
2626 try :
27+ humanize .i18n .activate ("lv" )
28+ assert humanize .naturaltime (three_seconds ) == "pirms 3 sekundēm"
29+ assert humanize .ordinal (5 ) == "5."
30+
2731 humanize .i18n .activate ("ru_RU" )
2832 assert humanize .naturaltime (three_seconds ) == "3 секунды назад"
2933 assert humanize .ordinal (5 ) == "5ый"
@@ -32,14 +36,6 @@ def test_i18n() -> None:
3236 except FileNotFoundError :
3337 pytest .skip ("Generate .mo with scripts/generate-translation-binaries.sh" )
3438
35- try :
36- humanize .i18n .activate ("lv" )
37- assert humanize .naturaltime (three_seconds ) == "pirms 3 sekundēm"
38- assert humanize .ordinal (5 ) == "5."
39-
40- except FileNotFoundError :
41- pytest .skip ("Generate .mo with scripts/generate-translation-binaries.sh" )
42-
4339 finally :
4440 humanize .i18n .deactivate ()
4541 assert humanize .naturaltime (three_seconds ) == "3 seconds ago"
You can’t perform that action at this time.
0 commit comments