diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-03-02 05:53:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-02 05:53:00 (GMT) |
commit | 1e68716fd5ca20f923224d05e9a5edd8598c9d6f (patch) | |
tree | 2bfbe24a68d4458881908c09d5580afc1c17de7b /Lib/test/test_re.py | |
parent | 227e42754059806e37aab276baa9d251059aaba6 (diff) | |
download | cpython-1e68716fd5ca20f923224d05e9a5edd8598c9d6f.zip cpython-1e68716fd5ca20f923224d05e9a5edd8598c9d6f.tar.gz cpython-1e68716fd5ca20f923224d05e9a5edd8598c9d6f.tar.bz2 |
Revert "make the locale_flag fallback code work again (#375)" (#387)
This reverts commit 43f5df5bfaea5a07c913d12cb92f78f997feb371.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index a195320..92d2c13 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1400,8 +1400,6 @@ 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: @@ -1415,6 +1413,9 @@ 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: |