fail when negative values are passed to instr()

This commit is contained in:
Benjamin Peterson 2016-08-15 21:40:14 -07:00
parent 5e4aafa258
commit 432ea4ff37
3 changed files with 12 additions and 2 deletions

View file

@ -165,6 +165,8 @@ class TestCurses(unittest.TestCase):
self.assertRaises(ValueError, stdscr.getstr, -400)
self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400)
self.assertRaises(ValueError, stdscr.instr, -2)
self.assertRaises(ValueError, stdscr.instr, 2, 3, -2)
def test_module_funcs(self):