diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-03-01 07:59:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-01 07:59:12 (GMT) |
commit | 43f5df5bfaea5a07c913d12cb92f78f997feb371 (patch) | |
tree | 54723b58ba7cda0cce995210478f59e07823da5a /Lib/test/test_re.py | |
parent | f870a4839a648a6cd8d25550a64d949c757abee7 (diff) | |
download | cpython-43f5df5bfaea5a07c913d12cb92f78f997feb371.zip cpython-43f5df5bfaea5a07c913d12cb92f78f997feb371.tar.gz cpython-43f5df5bfaea5a07c913d12cb92f78f997feb371.tar.bz2 |
make the locale_flag fallback code work again (#375)
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 92d2c13..a195320 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1400,6 +1400,8 @@ class ReTests(unittest.TestCase): def test_locale_flag(self): import locale enc = locale.getpreferredencoding(False) + bletter = None + bpat = b'A' # Search non-ASCII letter for i in range(128, 256): try: @@ -1413,9 +1415,6 @@ class ReTests(unittest.TestCase): break except (UnicodeError, TypeError): pass - else: - bletter = None - bpat = b'A' # Bytes patterns pat = re.compile(bpat, re.LOCALE | re.IGNORECASE) if bletter: |