From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 20 Jul 2025 12:30:09 +0000 (+0200) Subject: [3.13] gh-130655: gettext: Add fallback testcase (GH-136857) (#136863) X-Git-Tag: v3.13.6~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc8b9d6939fec729309ef6f0b00075af7417be12;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-130655: gettext: Add fallback testcase (GH-136857) (#136863) gh-130655: gettext: Add fallback testcase (GH-136857) (cherry picked from commit c6e6fe92cd8b90d546652764e3eaf1631da16f8f) Co-authored-by: Dominic H --- diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py index 172991532959..681de239d8cc 100644 --- a/Lib/test/test_gettext.py +++ b/Lib/test/test_gettext.py @@ -981,6 +981,13 @@ class MiscTestCase(unittest.TestCase): not_exported={'c2py', 'ENOENT'}) +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()