Skip to content

Commit 3b76188

Browse files
bpo-39050: The Help button in IDLE's config menu works again (GH-17611)
Co-authored-by: Terry Jan Reedy <[email protected]> (cherry picked from commit 2e43b64) Co-authored-by: Zackery Spytz <[email protected]>
1 parent fdb2160 commit 3b76188

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

Lib/idlelib/NEWS.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Released on 2019-12-16?
33
======================================
44

55

6+
bpo-39050: Make Settings dialog Help button work again.
7+
68
bpo-32989: Add tests for editor newline_and_indent_event method.
79
Remove dead code from pyparse find_good_parse_start method.
810

Lib/idlelib/configdialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def help(self):
210210
"""
211211
page = self.note.tab(self.note.select(), option='text').strip()
212212
view_text(self, title='Help for IDLE preferences',
213-
text=help_common+help_pages.get(page, ''))
213+
contents=help_common+help_pages.get(page, ''))
214214

215215
def deactivate_current_config(self):
216216
"""Remove current key bindings.

Lib/idlelib/idle_test/test_configdialog.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ def tearDownModule():
4747
root.destroy()
4848
root = dialog = None
4949

50+
class ConfigDialogTest(unittest.TestCase):
51+
52+
def test_help(self):
53+
dialog.note.select(dialog.keyspage)
54+
saved = configdialog.view_text
55+
view = configdialog.view_text = Func()
56+
dialog.help()
57+
s = view.kwds['contents']
58+
self.assertTrue(s.startswith('When you click'))
59+
self.assertTrue(s.endswith('a different name.\n'))
60+
configdialog.view_text = saved
5061

5162
class FontPageTest(unittest.TestCase):
5263
"""Test that font widgets enable users to make font changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make IDLE Settings dialog Help button work again.

0 commit comments

Comments
 (0)