Terry J. Reedy <tjre...@udel.edu> added the comment:

This seemingly useless test is the only test failure for me with installed 
3.9.1.  Why keep it, at least on Windows.

The failure with "locale.Error: unsupported locale setting" is not limited to 
Windows.  #25191 and duplicate #31636 report the same error on user machines 
(non-buildbot, as here). #25191proposes the following patch to skip this 
failure.

-        locale.setlocale(locale.LC_CTYPE, loc)
-        self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE))
+        try:
+            locale.setlocale(locale.LC_CTYPE, loc)
+            self.assertEqual(loc, locale.getlocale(locale.LC_CTYPE))
+        except locale.Error:
+            # Unsupported locale setting
+            self.skipTest('unsupported locale setting')

I believe that this is effectively the same as deleting the test.  But if we 
believe it is being skipped on at least Windows buildbots, then we should do 
the same at least on user Windows machines.  Or, if we could detect user 
manchines, skip on them.

----------
nosy: +serhiy.storchaka
title: [Windows] locale.getdefaultlocale() issues on Windows: 
test_locale.test_getsetlocale_issue1813() -> 
test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37945>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to