Skip to content

Skip curses tests when scr_dump()/is_keypad() are unavailable#153866

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-test-narrow-guards
Jul 17, 2026
Merged

Skip curses tests when scr_dump()/is_keypad() are unavailable#153866
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-test-narrow-guards

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

test_scr_dump() and test_state_getters() errored with AttributeError instead of skipping on curses builds that lack scr_dump(), is_keypad() or is_leaveok() — these are conditionally compiled, so they are absent on some builds (e.g. narrow ncurses, NetBSD curses, PDCurses). Standard wide-ncurses buildbots have them all, which is why this went unnoticed.

test_scr_dump() now uses @requires_curses_func('scr_dump'), and the getter loop in test_state_getters() skips a getter that the window does not provide.

test_scr_dump() and test_state_getters() errored instead of skipping on
builds without scr_dump(), is_keypad() or is_leaveok() (e.g. some narrow
ncurses, NetBSD, PDCurses).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Jul 17, 2026
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 17, 2026 21:30
@serhiy-storchaka
serhiy-storchaka merged commit a4c19f5 into python:main Jul 17, 2026
56 checks passed
fedonman pushed a commit to fedonman/cpython that referenced this pull request Jul 18, 2026
…GH-153866)

test_scr_dump() and test_state_getters() errored instead of skipping on
builds without scr_dump(), is_keypad() or is_leaveok() (e.g. some narrow
ncurses, NetBSD, PDCurses).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant