mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
This reverts commit 43f5df5bfa
.
This commit is contained in:
parent
227e427540
commit
1e68716fd5
1 changed files with 3 additions and 2 deletions
|
@ -1400,8 +1400,6 @@ class ReTests(unittest.TestCase):
|
||||||
def test_locale_flag(self):
|
def test_locale_flag(self):
|
||||||
import locale
|
import locale
|
||||||
enc = locale.getpreferredencoding(False)
|
enc = locale.getpreferredencoding(False)
|
||||||
bletter = None
|
|
||||||
bpat = b'A'
|
|
||||||
# Search non-ASCII letter
|
# Search non-ASCII letter
|
||||||
for i in range(128, 256):
|
for i in range(128, 256):
|
||||||
try:
|
try:
|
||||||
|
@ -1415,6 +1413,9 @@ class ReTests(unittest.TestCase):
|
||||||
break
|
break
|
||||||
except (UnicodeError, TypeError):
|
except (UnicodeError, TypeError):
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
bletter = None
|
||||||
|
bpat = b'A'
|
||||||
# Bytes patterns
|
# Bytes patterns
|
||||||
pat = re.compile(bpat, re.LOCALE | re.IGNORECASE)
|
pat = re.compile(bpat, re.LOCALE | re.IGNORECASE)
|
||||||
if bletter:
|
if bletter:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue