Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,21 @@ def test_none_locale(self) -> None:
humanize.i18n.deactivate()

assert test_str == humanize.naturaltime(three_seconds)


from humanize.i18n import _gettext_noop


def test_gettext_noop():
assert _gettext_noop("hello") == "hello"


from humanize.i18n import _ngettext_noop


def test_gettext_noop():
assert _gettext_noop("hello") == "hello"


def test_ngettext_noop():
assert _ngettext_noop("item", "items") == ("item", "items")