Skip to content

Commit b8fe144

Browse files
committed
Fix test formatting
1 parent 75183c3 commit b8fe144

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

tests/test_i18n.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)