fix: i18n relative path + reformat using pre-commit

This commit is contained in:
Katant 2025-12-09 06:08:34 +10:00
parent 79ee135331
commit 094895f054
No known key found for this signature in database
GPG key ID: 455A705F97DD82DB
9 changed files with 8 additions and 10 deletions

View file

@ -1,3 +1,4 @@
from pathlib import Path
from typing import Any, Dict
import pytest
@ -27,6 +28,10 @@ class TestI18nCore:
def test_init(self, i18n: I18n):
assert set(i18n.available_locales) == {"en", "uk"}
def test_init_relative(self):
i18n_relative = I18n(path="tests/data/locales")
assert set(i18n_relative.available_locales) == {"en", "uk"}
def test_reload(self, i18n: I18n):
i18n.reload()
assert set(i18n.available_locales) == {"en", "uk"}