New submission from Nick Coghlan <[email protected]>:
test_curses fails for me by default (running on Fedora 35 in KDE's Konsole):
```
[ncoghlan@thechalk cpython]$ echo $TERM
xterm-256color
[ncoghlan@thechalk cpython]$ ./python -m test -u curses test_curses
0:00:00 load avg: 0.88 Run tests sequentially
0:00:00 load avg: 0.88 [1/1] test_curses
test test_curses failed -- Traceback (most recent call last):
File "/home/ncoghlan/devel/cpython/Lib/test/test_curses.py", line 48, in
wrapped
test(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ncoghlan/devel/cpython/Lib/test/test_curses.py", line 993, in
test_use_default_colors
self.assertIn(old, [(curses.COLOR_WHITE, curses.COLOR_BLACK), (-1, -1), (0,
0)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: (15, 0) not found in [(7, 0), (-1, -1), (0, 0)]
test_curses failed (1 failure)
== Tests result: FAILURE ==
1 test failed:
test_curses
Total duration: 466 ms
Tests result: FAILURE
```
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:
```
[ncoghlan@thechalk cpython]$ infocmp -L | grep initialize_color
initialize_color=\E]4;%p1%d;rgb\072%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\,
```
----------
components: Tests
messages: 415539
nosy: ncoghlan, petr.viktorin, twouters
priority: normal
severity: normal
stage: needs patch
status: open
title: test_curses fails if terminal defaults to bright white text (15)
type: behavior
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue47065>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com