]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 26 Apr 2022 04:59:56 +0000 (07:59 +0300)
committerGitHub <noreply@github.com>
Tue, 26 Apr 2022 04:59:56 +0000 (07:59 +0300)
Lib/test/test_curses.py

index d3c152c42cf62f5c61ba7eb4e44728546c3ca672..b550f4af555ce4e96bf9ad6aff23ff798bf5dc79 100644 (file)
@@ -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)