mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
``local.getlocale(locale.LC_CTYPE)`` and ``locale.getpreferredencoding(False)`` may give different answers in some cases (such as the ``en_IN`` locale). ``re.LOCALE`` uses the latter, so update the test case to match.
This commit is contained in:
parent
d372cda5cd
commit
0683d6889b
2 changed files with 6 additions and 1 deletions
|
@ -1402,7 +1402,7 @@ class ReTests(unittest.TestCase):
|
||||||
|
|
||||||
def test_locale_flag(self):
|
def test_locale_flag(self):
|
||||||
import locale
|
import locale
|
||||||
_, enc = locale.getlocale(locale.LC_CTYPE)
|
enc = locale.getpreferredencoding(False)
|
||||||
# Search non-ASCII letter
|
# Search non-ASCII letter
|
||||||
for i in range(128, 256):
|
for i in range(128, 256):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -202,6 +202,11 @@ Documentation
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- 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 #28950: Disallow -j0 to be combined with -T/-l in regrtest
|
- Issue #28950: Disallow -j0 to be combined with -T/-l in regrtest
|
||||||
command line arguments.
|
command line arguments.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue