Skip to content

Commit 1e68716

Browse files
authored
Revert "make the locale_flag fallback code work again (#375)" (#387)
This reverts commit 43f5df5.
1 parent 227e427 commit 1e68716

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_re.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,8 +1400,6 @@ def test_ascii_and_unicode_flag(self):
14001400
def test_locale_flag(self):
14011401
import locale
14021402
enc = locale.getpreferredencoding(False)
1403-
bletter = None
1404-
bpat = b'A'
14051403
# Search non-ASCII letter
14061404
for i in range(128, 256):
14071405
try:
@@ -1415,6 +1413,9 @@ def test_locale_flag(self):
14151413
break
14161414
except (UnicodeError, TypeError):
14171415
pass
1416+
else:
1417+
bletter = None
1418+
bpat = b'A'
14181419
# Bytes patterns
14191420
pat = re.compile(bpat, re.LOCALE | re.IGNORECASE)
14201421
if bletter:

0 commit comments

Comments
 (0)