summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_re.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 797d85d..0a77e6f 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1552,8 +1552,7 @@ class ReTests(unittest.TestCase):
self.assertRaises(re.error, re.compile, r'(?au)\w')
def test_locale_flag(self):
- import locale
- _, enc = locale.getlocale(locale.LC_CTYPE)
+ enc = locale.getpreferredencoding()
# Search non-ASCII letter
for i in range(128, 256):
try: