def test_locale_flag(self):
import locale
- enc = locale.getpreferredencoding(False)
+ _, enc = locale.getlocale(locale.LC_CTYPE)
# Search non-ASCII letter
for i in range(128, 256):
try:
Tests
-----
-- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS.
- Skip some tests of select.poll when running on macOS due to unresolved
- issues with the underlying system poll function on some macOS versions.
-
-- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag,
- test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to
- determine the candidate encoding for the test regex (allowing it to correctly
- skip the test when the default locale encoding is a multi-byte encoding)
-
- Issue #24932: Use proper command line parsing in _testembed
- Issue #28950: Disallow -j0 to be combined with -T/-l in regrtest