Skip to content

Commit cc8b9d6

Browse files
[3.13] gh-130655: gettext: Add fallback testcase (GH-136857) (#136863)
gh-130655: gettext: Add fallback testcase (GH-136857) (cherry picked from commit c6e6fe9) Co-authored-by: Dominic H <[email protected]>
1 parent 1172f4c commit cc8b9d6

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
@@ -981,6 +981,13 @@ def test__all__(self):
981981
not_exported={'c2py', 'ENOENT'})
982982

983983

984+
class TranslationFallbackTestCase(unittest.TestCase):
985+
def test_translation_fallback(self):
986+
with os_helper.temp_cwd() as tempdir:
987+
t = gettext.translation('gettext', localedir=tempdir, fallback=True)
988+
self.assertIsInstance(t, gettext.NullTranslations)
989+
990+
984991
if __name__ == '__main__':
985992
unittest.main()
986993

0 commit comments

Comments
 (0)