@@ -241,12 +241,13 @@ def __init__(self, parent, filename, title):
241
241
Toplevel .__init__ (self , parent )
242
242
self .wm_title (title )
243
243
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' )
245
246
self .grid_columnconfigure (0 , weight = 1 )
246
247
self .grid_rowconfigure (0 , weight = 1 )
247
248
248
249
249
- def copy_strip ():
250
+ def copy_strip (): # pragma: no cover
250
251
"""Copy idle.html to idlelib/help.html, stripping trailing whitespace.
251
252
252
253
Files with trailing whitespace cannot be pushed to the git cpython
@@ -279,18 +280,18 @@ def copy_strip():
279
280
print (f'{ src } copied to { dst } ' )
280
281
281
282
282
- def _helpwindow (parent ):
283
+ def show_idlehelp (parent ):
283
284
"Create HelpWindow; called from Idle Help event handler."
284
285
filename = join (abspath (dirname (__file__ )), 'help.html' )
285
- if not isfile (filename ):
286
+ if not isfile (filename ): # pragma: no cover
286
287
# Try copy_strip, present message.
287
288
return
288
- HelpWindow (parent , filename , 'IDLE Help (%s)' % python_version ())
289
+ return HelpWindow (parent , filename , 'IDLE Doc (%s)' % python_version ())
289
290
290
291
291
292
if __name__ == '__main__' :
292
293
from unittest import main
293
294
main ('idlelib.idle_test.test_help' , verbosity = 2 , exit = False )
294
295
295
296
from idlelib .idle_test .htest import run
296
- run (_helpwindow )
297
+ run (show_idlehelp )
0 commit comments