diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 17b3af47c35..3b442fe6a4b 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -330,7 +330,8 @@ class TestCurses(unittest.TestCase): @requires_curses_func('panel') def test_userptr_segfault(self): - panel = curses.panel.new_panel(self.stdscr) + w = curses.newwin(10, 10) + panel = curses.panel.new_panel(w) class A: def __del__(self): panel.set_userptr(None) @@ -339,7 +340,8 @@ class TestCurses(unittest.TestCase): @requires_curses_func('panel') def test_new_curses_panel(self): - panel = curses.panel.new_panel(self.stdscr) + w = curses.newwin(10, 10) + panel = curses.panel.new_panel(w) self.assertRaises(TypeError, type(panel)) @requires_curses_func('is_term_resized')