FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-151776: Fix test_state_getters on terminals without insert/delete capability by serhiy-storchaka · Pull Request #152304 · python/cpython · GitHub

Repository navigation

gh-151776: Fix test_state_getters on terminals without insert/delete capability - #152304

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-state-getters-buildbot
Jun 26, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-state-getters-buildbot

Conversation

Copy link
Copy Markdown
Member

idcok() and idlok() only take effect when the terminal can insert or delete characters or lines (ncurses sets the window flag to flag && has_ic() and flag && (has_il() || change_scroll_region) respectively). On terminals without those capabilities, is_idcok()/is_idlok() return False even after setting the flag to True, so test_state_getters failed on many buildbots.

Drop these two from the unconditional round-trip loop and assert their getters against the terminal's actual capabilities instead.

…elete capability

idcok() and idlok() take effect only when the terminal can insert or
delete characters or lines, so check their getters against the
terminal's capabilities instead of asserting an unconditional round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bedevere-app Bot added the tests Tests in the Lib/test dir label Jun 26, 2026
serhiy-storchaka added skip news and removed tests Tests in the Lib/test dir labels Jun 26, 2026
serhiy-storchaka enabled auto-merge (squash) June 26, 2026 15:27
serhiy-storchaka merged commit bf61794 into python:main Jun 26, 2026
56 checks passed
serhiy-storchaka deleted the curses-state-getters-buildbot branch July 1, 2026 16:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL