diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-04-26 05:57:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 05:57:57 (GMT) |
commit | 3e219d312321a1dbb3a475607dfcaaa5925fed79 (patch) | |
tree | 5bf08a1bcfeeb77d542e400aff24f123845d0a35 | |
parent | 79712c9d2ec7a338b87d1a8b31a8404191e83823 (diff) | |
download | cpython-3e219d312321a1dbb3a475607dfcaaa5925fed79.zip cpython-3e219d312321a1dbb3a475607dfcaaa5925fed79.tar.gz cpython-3e219d312321a1dbb3a475607dfcaaa5925fed79.tar.bz2 |
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
(cherry picked from commit f41c16bf512778fca4bfabca887c4c303cc21896)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r-- | Lib/test/test_curses.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index d3c152c..b550f4a 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -268,7 +268,12 @@ class TestCurses(unittest.TestCase): stdscr.echochar(b'A') stdscr.echochar(65) 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) self.assertIs(stdscr.is_wintouched(), False) |