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.
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 1d7fb76..92d2c13 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1399,7 +1399,7 @@
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: