mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Who even uses this "Windows" thing...?
This commit is contained in:
parent
c40039fa3d
commit
d75292d33e
2 changed files with 7 additions and 5 deletions
|
|
@ -771,18 +771,20 @@ def test_encoding_not_ignored(self, patch_expand_lang):
|
|||
patch_expand_lang.assert_any_call('ga_IE.UTF-8')
|
||||
self.env.unset('LANGUAGE')
|
||||
|
||||
@unittest.skipIf(os.name != "posix", "LC_MESSAGES is posix only")
|
||||
def test_find_LANGUAGE_priority(self):
|
||||
orig = locale.setlocale(locale.LC_MESSAGES)
|
||||
self.addCleanup(lambda: locale.setlocale(locale.LC_MESSAGES, orig))
|
||||
self.env.set('LANGUAGE', 'ga_IE')
|
||||
self.env.set('LC_ALL', 'pt_BR')
|
||||
locale.setlocale(locale.LC_MESSAGES, 'pt_BR')
|
||||
if os.name != "posix":
|
||||
orig = locale.setlocale(locale.LC_MESSAGES)
|
||||
self.addCleanup(lambda: locale.setlocale(locale.LC_MESSAGES, orig))
|
||||
locale.setlocale(locale.LC_MESSAGES, 'pt_BR')
|
||||
mo_file = self.create_mo_file("ga_IE")
|
||||
|
||||
result = gettext.find("mofile", localedir=os.path.join(self.tempdir, "locale"))
|
||||
self.assertEqual(result, mo_file)
|
||||
locale.setlocale(locale.LC_MESSAGES, orig)
|
||||
|
||||
@unittest.skipIf(os.name != "posix", "LC_MESSAGES is posix only")
|
||||
def test_process_vars_override(self):
|
||||
orig = locale.setlocale(locale.LC_MESSAGES)
|
||||
self.addCleanup(lambda: locale.setlocale(locale.LC_MESSAGES, orig))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue