@@ -241,12 +241,13 @@ def __init__(self, parent, filename, title):
241241 Toplevel .__init__ (self , parent )
242242 self .wm_title (title )
243243 self .protocol ("WM_DELETE_WINDOW" , self .destroy )
244- HelpFrame (self , filename ).grid (column = 0 , row = 0 , sticky = 'nsew' )
244+ self .frame = HelpFrame (self , filename )
245+ self .frame .grid (column = 0 , row = 0 , sticky = 'nsew' )
245246 self .grid_columnconfigure (0 , weight = 1 )
246247 self .grid_rowconfigure (0 , weight = 1 )
247248
248249
249- def copy_strip ():
250+ def copy_strip (): # pragma: no cover
250251 """Copy idle.html to idlelib/help.html, stripping trailing whitespace.
251252
252253 Files with trailing whitespace cannot be pushed to the git cpython
@@ -279,18 +280,18 @@ def copy_strip():
279280 print (f'{ src } copied to { dst } ' )
280281
281282
282- def _helpwindow (parent ):
283+ def show_idlehelp (parent ):
283284 "Create HelpWindow; called from Idle Help event handler."
284285 filename = join (abspath (dirname (__file__ )), 'help.html' )
285- if not isfile (filename ):
286+ if not isfile (filename ): # pragma: no cover
286287 # Try copy_strip, present message.
287288 return
288- HelpWindow (parent , filename , 'IDLE Help (%s)' % python_version ())
289+ return HelpWindow (parent , filename , 'IDLE Doc (%s)' % python_version ())
289290
290291
291292if __name__ == '__main__' :
292293 from unittest import main
293294 main ('idlelib.idle_test.test_help' , verbosity = 2 , exit = False )
294295
295296 from idlelib .idle_test .htest import run
296- run (_helpwindow )
297+ run (show_idlehelp )
0 commit comments