Fix a few more Python tests

This commit is contained in:
Justine Tunney 2021-08-16 23:45:41 -07:00
parent 59e1c245d1
commit bc464a8898
7 changed files with 1018 additions and 547 deletions

View file

@ -23,7 +23,7 @@ else:
def getpreferredencoding(do_setlocale=True):
assert not do_setlocale
result = _locale.nl_langinfo(_locale.CODESET)
if not result and sys.platform == 'darwin':
if not result and sys.platform in ('darwin', 'cosmo'):
# nl_langinfo can return an empty string
# when the setting has an invalid value.
# Default to UTF-8 in that case because