Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9ec0ee commit 4635115Copy full SHA for 4635115
1 file changed
Lib/test/test_readline.py
@@ -1,6 +1,7 @@
1
"""
2
Very minimal unittests for parts of the readline module.
3
4
+import codecs
5
import locale
6
import os
7
import sys
@@ -231,6 +232,13 @@ def test_nonascii(self):
231
232
# writing and reading non-ASCII bytes into/from a TTY works, but
233
# readline or ncurses ignores non-ASCII bytes on read.
234
self.skipTest(f"the LC_CTYPE locale is {loc!r}")
235
+ if sys.flags.utf8_mode:
236
+ encoding = locale.getencoding()
237
+ encoding = codecs.lookup(encoding).name # normalize the name
238
+ if encoding != "utf-8":
239
+ # gh-133711: The Python UTF-8 Mode ignores the LC_CTYPE locale
240
+ # and always use the UTF-8 encoding.
241
+ self.skipTest(f"the LC_CTYPE encoding is {encoding!r}")
242
243
try:
244
readline.add_history("\xEB\xEF")
0 commit comments