Repository navigation
test_curses failures on Python 3.16.0a1 with ncurses 6.6 on openSUSE #159579
Description
Bug report
Description
Building Python 3.16.0a1 as an openSUSE RPM fails during the test suite because of failures in test_curses. The failures occur both in the initial run and when the test runner reruns the failed tests.
Environment
- Python 3.16.0a1, built from
Python-3.16.0a1.tar.xz - openSUSE OBS build environment, Linux x86_64
- ncurses package version
6.6.20260926-115.1 TERM=linux_cursescompiled with-I/usr/include/ncurseswand linked with-lncursesw- Distribution patches applied. I have not yet reproduced this with an unpatched upstream checkout.
The tests report:
ncurses_version = curses.ncurses_version(major=6, minor=6, patch=20260926)
How the tests were run
The RPM's %check step runs make test with options including:
-u curses,-network -v -i test_freeze_simple_script --timeout=5400
The invocation also excludes some distribution-selected tests.
Failures
The failures fall into several groups. I do not know whether they share a cause.
Input and input pushback
test_get_wstr returns an empty string instead of the queued input:
FAIL: test_get_wstr (test.test_curses.TestCurses.test_get_wstr) (s='Lorem')
File "Lib/test/test_curses.py", line 1352, in test_get_wstr
self.assertEqual(win.get_wstr(0, 0), s)
AssertionError: '' != 'Lorem'
test_getstr fails while pushing input:
ERROR: test_getstr (test.test_curses.TestCurses.test_getstr)
File "Lib/test/test_curses.py", line 1324, in test_getstr
curses.ungetch(c)
curses.error: unget_wch() (called by ungetch()) returned ERR
The source routes string arguments to ungetch() through unget_wch(), while test_getch pushes strings and reads them using getch(). Could this contribute to these failures?
On the rerun, textbox input tests also fail with:
curses.error: wget_wch() (called by get_wch()): no input
Some input failures may be secondary to unread input left by earlier failed tests.
Textbox lower-right cell
The final character is missing in several textbox tests:
test_textbox_fill_last_cell:
AssertionError: 'abc ' != 'abcd'
test_textbox_fill_last_cell_insert_mode:
AssertionError: 'abc ' != 'abcd'
test_textbox_fill_last_cell_multiline:
AssertionError: 'abc\nde \n' != 'abc\ndef\n'
test_textbox_fill_last_cell_scrollok:
AssertionError: 'abc\nde \n' != 'abc\ndef\n'
Textbox._insert_printable_char() uses insch() for the lower-right cell.
WACS constants
test_wacs_in_cell_methods fails when reading back WACS_DIAMOND:
File "Lib/test/test_curses.py", line 617, in test_wacs_in_cell_methods
self.assertEqual(stdscr.in_wch(1, 0), curses.WACS_DIAMOND)
AssertionError: curses.complexchar('E', attr=1162149888, pair=69) != <curses.complexchar object at 0x7f4252bc49c0>
On the rerun, test_wacs_line_constants also raises the following for D_TTEE, T_ULCORNER, and T_URCORNER:
curses.error: getcchar() returned ERR
Overall result
1 test failed:
test_curses
467 tests OK.
Total tests: run=51,162 (filtered) failures=29 skipped=2,517
Total test files: run=541/549 (filtered) failed=1 skipped=72 resource_denied=9 rerun=1
Result: FAILURE
Related feature work includes #152233 and #155863. I have not found an existing report matching these failures.
CPython versions tested on:
3.16
Operating systems tested on:
Linux
Activity
picnixz commentedon Oct 16, 2026
cc @serhiy-storchaka