Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bpo-29571: Use correct locale encoding in test_re #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ def test_ascii_and_unicode_flag(self):

def test_locale_flag(self):
import locale
_, enc = locale.getlocale(locale.LC_CTYPE)
enc = locale.getpreferredencoding(False)
# Search non-ASCII letter
for i in range(128, 256):
try:
Expand Down
5 changes: 5 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,11 @@ Tools/Demos
Tests
-----

- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag,
test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to
determine the candidate encoding for the test regex (allowing it to correctly
skip the test when the default locale encoding is a multi-byte encoding)

- Issue #24932: Use proper command line parsing in _testembed

- Issue #28950: Disallow -j0 to be combined with -T/-l in regrtest
Expand Down