Commit Graph

79 Commits

Author SHA1 Message Date
Pablo Galindo
d0204963ec bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541) 2021-02-15 22:15:49 +00:00
Pablo Galindo
ab2d481639 bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R (GH-24539) 2021-02-15 22:35:48 +01:00
Serhiy Storchaka
a1e9a1e120 bpo-43016: Fix test_curses on platform without cursesw (GH-24405) 2021-01-31 23:21:55 +02:00
Serhiy Storchaka
d64fd4bb5b bpo-43016: Rewrite tests for curses (GH-24312) 2021-01-31 17:22:27 +02:00
Serhiy Storchaka
59f9b4e450 bpo-42681: Fix test_curses failures related to color pairs (GH-24089)
On ncurses 6.1 pair numbers are limited by SHORT_MAX-1, even
with extended color support.

Improve error reporting and tests for color functions.
2021-01-05 09:13:15 +02:00
Serhiy Storchaka
b6fc0c406e bpo-42789: Enable using /dev/tty in test_curses. (GH-24085)
It was temporary disabled for debugging.
2021-01-04 12:30:20 +02:00
Serhiy Storchaka
1470edd613 bpo-42681: Fix range checks for color and pair numbers in curses (GH-23874) 2021-01-03 22:51:11 +02:00
Serhiy Storchaka
607501abb4 bpo-42789: Don't skip curses tests on non-tty. (GH-24009)
If __stdout__ is not attached to terminal, try to use __stderr__
if it is attached to terminal, or open the terminal device, or
use regular file as terminal, but some functions will be untested
in the latter case.
2021-01-02 19:35:15 +02:00
Hans Petter Jansson
da4e09fff6 bpo-36982: Add support for extended color functions in ncurses 6.1 (GH-17536)
Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net>
2020-08-03 23:51:33 -04:00
Hai Shi
a7f5d93bb6 bpo-40275: Use new test.support helper submodules in tests (GH-21449) 2020-08-03 18:41:24 +02:00
Anthony Sottile
b32cb97bce bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938) 2019-10-31 11:13:48 +02:00
Serhiy Storchaka
b232df9197 bpo-31680: Add curses.ncurses_version. (GH-4217)
Use curses.ncurses_version for conditionally skipping a test.
2018-10-30 13:22:42 +02:00
Serhiy Storchaka
a7723d8b09 bpo-31924: Fix test_curses on NetBSD 8. (#4228) 2017-11-03 20:29:33 +02:00
Serhiy Storchaka
4f469c0966 bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (#4220) 2017-11-01 20:48:49 +02:00
Serhiy Storchaka
7e68790f3d bpo-15037: Add a workaround for getkey() in curses for ncurses 5.7 and earlier. (#3826)
Skip a test for unget_wch()/get_wch() on OpenBSD since they are broken
in ncurses 5.7.
2017-11-01 16:03:40 +02:00
Serhiy Storchaka
894ebd065e bpo-31919: Fix building the curses module on OpenIndiana. (#4211) 2017-11-01 14:34:20 +02:00
Serhiy Storchaka
baac01e629 bpo-31891: Fix building the curses module on NetBSD. (#4165) 2017-10-31 13:56:44 +02:00
Victor Stinner
19f68301a1 bpo-31629: Add support.SaveSignals (#4183)
test_curses now saves/restores signals. On FreeBSD, the curses module
sets handlers of some signals, but don't restore old handlers when
the module is deinitialized.
2017-10-31 03:14:01 -07:00
Serhiy Storchaka
f7eae0adfc [security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302)
Based on patch by Victor Stinner.

Add private C API function _PyUnicode_AsUnicode() which is similar to
PyUnicode_AsUnicode(), but checks for null characters.
2017-06-28 08:30:06 +03:00
Xavier de Gaye
645bc80918 test_curses - substitute self.skip() with self.skipTest() 2017-01-06 09:50:27 +01:00
Serhiy Storchaka
bdf9e0ea74 Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox.
Based on patch by Tycho Andersen.
2016-12-28 10:16:06 +02:00
Serhiy Storchaka
283de2b9c1 Issue #9770: curses.ascii predicates now work correctly with negative integers. 2016-12-28 10:04:27 +02:00
Berker Peksag
53926f19cd Issue #27801: Skip test_update_lines_cols when update_lines_cols() is not available 2016-08-19 17:59:01 +03:00
Benjamin Peterson
b1c6bdc76a merge 3.4 2016-08-15 21:43:57 -07:00
Benjamin Peterson
432ea4ff37 fail when negative values are passed to instr() 2016-08-15 21:40:14 -07:00