◐ Shell
clean mode source ↗

bpo-24813: IDLE: Add icon to help_about by csabella · Pull Request #2335 · python/cpython

terryjreedy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to specify icon to left (this is standard), 'IDLE' to its right (in current center). With this position switch and 1 name change, PR will be ready to merge.


tk_patchlevel = self.tk.call('info', 'patchlevel')
ext = '.png' if tk_patchlevel >= '8.6' else '.gif'
iconfn = os.path.join(os.path.abspath(os.path.dirname(__file__)),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect 'iconfn' abbreviates 'icon file name'. Too obscure; I'd prefer 'icon' here and below.

"""Test about dialog logo."""
path, file = os.path.split(self.dialog.icon_image['file'])
fn, ext = os.path.splitext(file)
self.assertEqual(fn, 'idle_48')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the best I can think of too. The real test is running help_about for the htest. I did that to experiment with different backgrounds.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I wasn't sure if I should mock the PhotoImage just to show that the widget is created.