-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
test_curses fails if terminal defaults to bright white text (15) #91221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
test_curses fails for me by default (running on Fedora 35 in KDE's Konsole):
The active terminal info indicates that the default text colour is indeed bright white (assuming I'm reading the infocmp output correctly), so it feels like (15, 0) is just missing from the set of permissible "old" colour pairs in the test case:
|
I am surprised. I use Konsole too, and the TERM value and the infocmp output are the same for me. |
can we reliably query for what the default is and add that to the expectations? or just skip the test if the defaults don't match our expectations (less ideal)? if those are a challenge to do reliably - adding 15, 0 to the expected set may be the most practical. |
Same issue with Konsole on openSUSE 15.3 while compiling Python 3.9.14 and 3.10.7 `TERM=xterm-256color ======================================================================
|
Same issue with Konsole on Fedora 38:
|
I created two PRs, one that skips this check, and aonther that adds (15, 0) as a valid pair. I don't know how easy and how likely there would be users that could have their own custom terminfo possibly with different |
#132990) Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color.
…56color (pythonGH-132990) Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color. (cherry picked from commit 7f02ded) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…256color (GH-132990) (#132992) gh-91221: fix `test_curses.test_use_default_colors` for xterm-256color (GH-132990) Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color. (cherry picked from commit 7f02ded) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
I've added the (15,0) pair so I think we can close this one. Let's re-open it other users have different issues and at this time we'll decide whether to skip the check or try to deduce more reliably the supported values. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
curses.pair_content(0)
#132986test_curses.test_use_default_colors
for xterm-256color #132990test_curses.test_use_default_colors
for xterm-256color (GH-132990) #132992The text was updated successfully, but these errors were encountered: