summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-08-14 01:15:28 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-08-14 01:15:28 (GMT)
commit40a77c33819606b40ca04f680a06fcf31e2151a6 (patch)
treeb8cb6de1e26e2a02bfdb60a79622e548384a4591 /Lib
parent59b6abd38c04472a256b1b04e8709defb29e44ef (diff)
downloadcpython-40a77c33819606b40ca04f680a06fcf31e2151a6.zip
cpython-40a77c33819606b40ca04f680a06fcf31e2151a6.tar.gz
cpython-40a77c33819606b40ca04f680a06fcf31e2151a6.tar.bz2
do not allow reading negative values with getstr()
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_curses.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index bd7d4fc..f049c29 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -163,6 +163,9 @@ class TestCurses(unittest.TestCase):
if hasattr(curses, 'enclose'):
stdscr.enclose()
+ self.assertRaises(ValueError, stdscr.getstr, -400)
+ self.assertRaises(ValueError, stdscr.getstr, 2, 3, -400)
+
def test_module_funcs(self):
"Test module-level functions"