diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index f6bd27d02e4315..0833c86115ebd9 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -930,7 +930,7 @@ def get_pair_limit(self): # 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