From: Pablo Galindo Date: Mon, 15 Feb 2021 22:15:49 +0000 (+0000) Subject: bpo-43231: Correctly calculate the curses color pair limit when checking for it ... X-Git-Tag: v3.10.0a6~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0204963ec87beb9732e924e464b8a6a1ef4d341;p=thirdparty%2FPython%2Fcpython.git bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541) --- diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index f6bd27d02e43..0833c86115eb 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -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