From 6903e22b39303694154a71e0693c607cad54dd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D1=8B=D1=81=D1=8B=D1=85=20=D0=92=2E=D0=90=2E?= Date: Sat, 13 Jun 2026 01:03:08 +0300 Subject: [PATCH 1/2] Fix i18n locale activation --- tests/test_i18n.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_i18n.py b/tests/test_i18n.py index 83afb89..e31d14f 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -324,3 +324,20 @@ def test_none_locale(self) -> None: humanize.i18n.deactivate() assert test_str == humanize.naturaltime(three_seconds) + +from humanize.i18n import _gettext_noop, activate + + +def test_gettext_noop(): + assert _gettext_noop("hello") == "hello" + + +from humanize.i18n import _gettext_noop, _ngettext_noop + + +def test_gettext_noop(): + assert _gettext_noop("hello") == "hello" + + +def test_ngettext_noop(): + assert _ngettext_noop("item", "items") == ("item", "items") \ No newline at end of file From 76964bc5665403bf3375b5febeb155b4f8867674 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 22:13:03 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_i18n.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_i18n.py b/tests/test_i18n.py index e31d14f..2b52ebf 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -325,14 +325,15 @@ def test_none_locale(self) -> None: assert test_str == humanize.naturaltime(three_seconds) -from humanize.i18n import _gettext_noop, activate + +from humanize.i18n import _gettext_noop def test_gettext_noop(): assert _gettext_noop("hello") == "hello" -from humanize.i18n import _gettext_noop, _ngettext_noop +from humanize.i18n import _ngettext_noop def test_gettext_noop(): @@ -340,4 +341,4 @@ def test_gettext_noop(): def test_ngettext_noop(): - assert _ngettext_noop("item", "items") == ("item", "items") \ No newline at end of file + assert _ngettext_noop("item", "items") == ("item", "items")