Skip to content

gh-159394: Fix test_curses when $LINES or $COLUMNS is set - #159665

Open
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:gh-159394-newterm-size
Open

serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:gh-159394-newterm-size

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

A new pseudo-terminal has no size, so newterm() takes the size of the screen from the LINES and COLUMNS environment variables, and from the terminfo entry only if they are unset. test_newterm and SLKTests.test_init_reserves_a_line failed when either variable was set. The newterm tests now set both, so the screen is always 24x80.

Also add a test for LINES and COLUMNS themselves.

🤖 Generated with Claude Code

The newterm() tests now set the size of the screen explicitly, instead of
depending on the environment.  Add a test for $LINES and $COLUMNS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…term-size

# Conflicts:
#	Lib/test/test_curses.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant