https://github.com/python/cpython/commit/c537b98e489501e6ad33f244b9eb1e78db1e1bf2
commit: c537b98e489501e6ad33f244b9eb1e78db1e1bf2
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: tomasr8 <[email protected]>
date: 2025-07-20T12:32:58Z
summary:

[3.14] gh-130655: gettext: Add fallback testcase (GH-136857) (#136862)

gh-130655: gettext: Add fallback testcase (GH-136857)
(cherry picked from commit c6e6fe92cd8b90d546652764e3eaf1631da16f8f)

Co-authored-by: Dominic H <[email protected]>

files:
M Lib/test/test_gettext.py

diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py
index 33b7d75e3ff203..9ad37909a8ec4e 100644
--- a/Lib/test/test_gettext.py
+++ b/Lib/test/test_gettext.py
@@ -937,6 +937,13 @@ def test_lazy_import(self):
         ensure_lazy_imports("gettext", {"re", "warnings", "locale"})
 
 
+class TranslationFallbackTestCase(unittest.TestCase):
+    def test_translation_fallback(self):
+        with os_helper.temp_cwd() as tempdir:
+            t = gettext.translation('gettext', localedir=tempdir, 
fallback=True)
+            self.assertIsInstance(t, gettext.NullTranslations)
+
+
 if __name__ == '__main__':
     unittest.main()
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to