mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-29571: Use correct locale encoding in test_re (#149)
``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
1b3d88eb33
commit
ace5c0fdd9
2 changed files with 6 additions and 1 deletions
|
@ -1399,7 +1399,7 @@ class ReTests(unittest.TestCase):
|
|||
|
||||
def test_locale_flag(self):
|
||||
import locale
|
||||
_, enc = locale.getlocale(locale.LC_CTYPE)
|
||||
enc = locale.getpreferredencoding(False)
|
||||
# Search non-ASCII letter
|
||||
for i in range(128, 256):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue