mirror of
https://github.com/python/cpython.git
synced 2025-10-25 10:44:55 +00:00
gh-125843: indicate which C function caused a curses.error (#125844)
- Rename error helpers with a `curses_set_error_*` prefix instead of `PyCurses*`. - Cleanly report both NULL and ERR cases. - Raise `curses.error` in `is_linetouched` instead of a `TypeError`.
This commit is contained in:
parent
c31547a591
commit
ee36db5500
4 changed files with 366 additions and 179 deletions
|
|
@ -130,6 +130,9 @@ def test_use_env(self):
|
|||
curses.use_env(False)
|
||||
curses.use_env(True)
|
||||
|
||||
def test_error(self):
|
||||
self.assertIsSubclass(curses.error, Exception)
|
||||
|
||||
def test_create_windows(self):
|
||||
win = curses.newwin(5, 10)
|
||||
self.assertEqual(win.getbegyx(), (0, 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue