]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43231: Correctly calculate the curses color pair limit when checking for it ...
authorPablo Galindo <Pablogsal@gmail.com>
Mon, 15 Feb 2021 22:15:49 +0000 (22:15 +0000)
committerGitHub <noreply@github.com>
Mon, 15 Feb 2021 22:15:49 +0000 (22:15 +0000)
Lib/test/test_curses.py

index f6bd27d02e43158d16355fae621795d340c74553..0833c86115ebd96a76e3ee62acb0e50d4dfaa9aa 100644 (file)
@@ -930,7 +930,7 @@ class TestCurses(unittest.TestCase):
             # range may be restricted, so we need to check if the limit is still
             # correct
             try:
-                curses.init_pair(pair_limit, 0, 0)
+                curses.init_pair(pair_limit - 1, 0, 0)
             except ValueError:
                 pair_limit = curses.COLOR_PAIRS
         return pair_limit