mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.14] gh-130655: gettext: Add fallback testcase (GH-136857) (#136862)
gh-130655: gettext: Add fallback testcase (GH-136857)
(cherry picked from commit c6e6fe92cd)
Co-authored-by: Dominic H <dom@dominic.sk>
This commit is contained in:
parent
ee37365e0d
commit
c537b98e48
1 changed files with 7 additions and 0 deletions
|
|
@ -937,6 +937,13 @@ class MiscTestCase(unittest.TestCase):
|
|||
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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue