diff options
author | 2021-02-15 22:15:49 +0000 | |
---|---|---|
committer | 2021-02-15 22:15:49 +0000 | |
commit | d0204963ec87beb9732e924e464b8a6a1ef4d341 (patch) | |
tree | ddb53073c193ac20e4ccc26e24be2a4ea4aa10e0 | |
parent | bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under ... (diff) | |
download | cpython-d0204963ec87beb9732e924e464b8a6a1ef4d341.tar.gz cpython-d0204963ec87beb9732e924e464b8a6a1ef4d341.tar.bz2 cpython-d0204963ec87beb9732e924e464b8a6a1ef4d341.zip |
bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541)
-rw-r--r-- | Lib/test/test_curses.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index f6bd27d02e4..0833c86115e 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 |