summaryrefslogtreecommitdiff
path: root/Lib/test/test_curses.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-15 21:40:14 -0700
committerBenjamin Peterson <benjamin@python.org>2016-08-15 21:40:14 -0700
commit432ea4ff375f920fa4a469d34e5dad56fb33f915 (patch)
tree909cb271045d26b32b535a53199f0f50d79d776f /Lib/test/test_curses.py
parent5e4aafa258fa85d1aebf469ddf8f5d43b7671c38 (diff)
downloadcpython-git-432ea4ff375f920fa4a469d34e5dad56fb33f915.tar.gz
fail when negative values are passed to instr()
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r--Lib/test/test_curses.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index f049c29c6b..379721a9ae 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -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):