mirror of
https://github.com/python/cpython.git
synced 2025-08-16 06:40:56 +00:00
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
(cherry picked from commit f41c16bf51
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
653a66668d
commit
f4252dfb8e
1 changed files with 6 additions and 1 deletions
|
@ -266,7 +266,12 @@ class TestCurses(unittest.TestCase):
|
||||||
stdscr.echochar(b'A')
|
stdscr.echochar(b'A')
|
||||||
stdscr.echochar(65)
|
stdscr.echochar(65)
|
||||||
with self.assertRaises((UnicodeEncodeError, OverflowError)):
|
with self.assertRaises((UnicodeEncodeError, OverflowError)):
|
||||||
stdscr.echochar('\u20ac')
|
# Unicode is not fully supported yet, but at least it does
|
||||||
|
# not crash.
|
||||||
|
# It is supposed to fail because either the character is
|
||||||
|
# not encodable with the current encoding, or it is encoded to
|
||||||
|
# a multibyte sequence.
|
||||||
|
stdscr.echochar('\u0114')
|
||||||
stdscr.echochar('A', curses.A_BOLD)
|
stdscr.echochar('A', curses.A_BOLD)
|
||||||
self.assertIs(stdscr.is_wintouched(), False)
|
self.assertIs(stdscr.is_wintouched(), False)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue