summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-08 17:46:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-08 17:46:55 (GMT)
commitdea76376cb8fc2c255438e9708f492a25a5f2759 (patch)
tree0c89f86a7b8b5f1ab1172194ef66e6adb7bd2e66 /Lib
parent1ce738e08f147beb724f22a9411724a955cd418d (diff)
parente3f1b0911e02f5108b90b9b25417a448a423da40 (diff)
downloadcpython-dea76376cb8fc2c255438e9708f492a25a5f2759.zip
cpython-dea76376cb8fc2c255438e9708f492a25a5f2759.tar.gz
cpython-dea76376cb8fc2c255438e9708f492a25a5f2759.tar.bz2
Issue #23815: Fixed crashes related to directly created instances of types in
_tkinter and curses.panel modules.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_curses.py4
-rw-r--r--Lib/test/test_tcl.py2
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index 2747041..222105e 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -285,6 +285,10 @@ class TestCurses(unittest.TestCase):
panel.set_userptr(A())
panel.set_userptr(None)
+ def test_new_curses_panel(self):
+ panel = curses.panel.new_panel(self.stdscr)
+ self.assertRaises(TypeError, type(panel))
+
@unittest.skipUnless(hasattr(curses, 'resizeterm'),
'resizeterm not available')
def test_resize_term(self):
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 25f6ede..8ffd185 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -649,6 +649,8 @@ class TclTest(unittest.TestCase):
expected = {'a': (1, 2, 3), 'something': 'foo', 'status': ''}
self.assertEqual(splitdict(tcl, arg), expected)
+ def test_new_tcl_obj(self):
+ self.assertRaises(TypeError, _tkinter.Tcl_Obj)
class BigmemTclTest(unittest.TestCase):