summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-04-26 04:59:56 (GMT)
committerGitHub <noreply@github.com>2022-04-26 04:59:56 (GMT)
commitf41c16bf512778fca4bfabca887c4c303cc21896 (patch)
treea5a3caaa37af60ac9b98b7383d16b798623ac521
parent36306cf7862097318a3fef74224075cc4cf37229 (diff)
downloadcpython-f41c16bf512778fca4bfabca887c4c303cc21896.zip
cpython-f41c16bf512778fca4bfabca887c4c303cc21896.tar.gz
cpython-f41c16bf512778fca4bfabca887c4c303cc21896.tar.bz2
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
-rw-r--r--Lib/test/test_curses.py7
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)