From 1e68716fd5ca20f923224d05e9a5edd8598c9d6f Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Wed, 1 Mar 2017 21:53:00 -0800 Subject: Revert "make the locale_flag fallback code work again (#375)" (#387) This reverts commit 43f5df5bfaea5a07c913d12cb92f78f997feb371. --- Lib/test/test_re.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_re.py') diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index a1953209e4..92d2c1386d 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: -- cgit v1.2.1