mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #23815: Fixed crashes related to directly created instances of types in
_tkinter and curses.panel modules.
This commit is contained in:
parent
4c35964b76
commit
e3f1b0911e
5 changed files with 16 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue