@@ -278,6 +278,14 @@ def test_subwindows_references(self):
278278 del win2
279279 gc_collect ()
280280
281+ def test_getparent (self ):
282+ # getparent() calls no curses function, so it works with any backend
283+ # and is not gated like the is_*() getters below.
284+ stdscr = self .stdscr
285+ self .assertIsNone (stdscr .getparent ())
286+ sub = stdscr .subwin (3 , 3 , 0 , 0 )
287+ self .assertIs (sub .getparent (), stdscr )
288+
281289 def test_dupwin (self ):
282290 win = curses .newwin (5 , 10 , 2 , 3 )
283291 win .addstr (0 , 0 , 'ABCDE' )
@@ -1718,14 +1726,6 @@ def test_input_options(self):
17181726 stdscr .timeout (0 )
17191727 stdscr .timeout (5 )
17201728
1721- def test_getparent (self ):
1722- # getparent() calls no curses function, so it works with any backend
1723- # and is not gated like the is_*() getters below.
1724- stdscr = self .stdscr
1725- self .assertIsNone (stdscr .getparent ())
1726- sub = stdscr .subwin (3 , 3 , 0 , 0 )
1727- self .assertIs (sub .getparent (), stdscr )
1728-
17291729 @requires_curses_window_meth ('is_scrollok' )
17301730 def test_state_getters (self ):
17311731 stdscr = self .stdscr
0 commit comments