Skip to content

Commit c6e6fe9

Browse files
gh-130655: gettext: Add fallback testcase (#136857)
1 parent 9c2f91c commit c6e6fe9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_gettext.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,13 @@ def test_lazy_import(self):
937937
ensure_lazy_imports("gettext", {"re", "warnings", "locale"})
938938

939939

940+
class TranslationFallbackTestCase(unittest.TestCase):
941+
def test_translation_fallback(self):
942+
with os_helper.temp_cwd() as tempdir:
943+
t = gettext.translation('gettext', localedir=tempdir, fallback=True)
944+
self.assertIsInstance(t, gettext.NullTranslations)
945+
946+
940947
if __name__ == '__main__':
941948
unittest.main()
942949

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy