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

Skip to content

Commit f41c16b

Browse files
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
1 parent 36306cf commit f41c16b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_curses.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,12 @@ def test_output_character(self):
268268
stdscr.echochar(b'A')
269269
stdscr.echochar(65)
270270
with self.assertRaises((UnicodeEncodeError, OverflowError)):
271-
stdscr.echochar('\u20ac')
271+
# Unicode is not fully supported yet, but at least it does
272+
# not crash.
273+
# It is supposed to fail because either the character is
274+
# not encodable with the current encoding, or it is encoded to
275+
# a multibyte sequence.
276+
stdscr.echochar('\u0114')
272277
stdscr.echochar('A', curses.A_BOLD)
273278
self.assertIs(stdscr.is_wintouched(), False)
274279

0 commit comments

Comments
 (0)