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

Skip to content

Commit f4252df

Browse files
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
(cherry picked from commit f41c16b) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 653a666 commit f4252df

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
@@ -266,7 +266,12 @@ def test_output_character(self):
266266
stdscr.echochar(b'A')
267267
stdscr.echochar(65)
268268
with self.assertRaises((UnicodeEncodeError, OverflowError)):
269-
stdscr.echochar('\u20ac')
269+
# Unicode is not fully supported yet, but at least it does
270+
# not crash.
271+
# It is supposed to fail because either the character is
272+
# not encodable with the current encoding, or it is encoded to
273+
# a multibyte sequence.
274+
stdscr.echochar('\u0114')
270275
stdscr.echochar('A', curses.A_BOLD)
271276
self.assertIs(stdscr.is_wintouched(), False)
272277

0 commit comments

Comments
 (0)