diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-01-23 04:11:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-23 04:11:53 (GMT) |
commit | ba83d1eb1c7b5e8eab17da364a6324b0b0e0932b (patch) | |
tree | e5963473202a77a6351fceb61ea429c7b7915ee7 /Lib/idlelib | |
parent | 9e06d61af30bac4fcacb7973f826147ccc010392 (diff) | |
download | cpython-ba83d1eb1c7b5e8eab17da364a6324b0b0e0932b.zip cpython-ba83d1eb1c7b5e8eab17da364a6324b0b0e0932b.tar.gz cpython-ba83d1eb1c7b5e8eab17da364a6324b0b0e0932b.tar.bz2 |
bpo-39050: The Help button in IDLE's config menu works again (GH-17611)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2e43b64c94e49f7133b9c26e84c9519935c49063)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/NEWS.txt | 2 | ||||
-rw-r--r-- | Lib/idlelib/configdialog.py | 2 | ||||
-rw-r--r-- | Lib/idlelib/idle_test/test_configdialog.py | 11 |
3 files changed, 14 insertions, 1 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 817bb2e..379e8c1 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,8 @@ Released on 2019-12-16? ====================================== +bpo-39050: Make Settings dialog Help button work again. + bpo-32989: Add tests for editor newline_and_indent_event method. Remove dead code from pyparse find_good_parse_start method. diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py index aaf319b..0e007b5 100644 --- a/Lib/idlelib/configdialog.py +++ b/Lib/idlelib/configdialog.py @@ -210,7 +210,7 @@ class ConfigDialog(Toplevel): """ page = self.note.tab(self.note.select(), option='text').strip() view_text(self, title='Help for IDLE preferences', - text=help_common+help_pages.get(page, '')) + contents=help_common+help_pages.get(page, '')) def deactivate_current_config(self): """Remove current key bindings. diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 1f14ed1..7c575d0 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -47,6 +47,17 @@ def tearDownModule(): root.destroy() root = dialog = None +class ConfigDialogTest(unittest.TestCase): + + def test_help(self): + dialog.note.select(dialog.keyspage) + saved = configdialog.view_text + view = configdialog.view_text = Func() + dialog.help() + s = view.kwds['contents'] + self.assertTrue(s.startswith('When you click')) + self.assertTrue(s.endswith('a different name.\n')) + configdialog.view_text = saved class FontPageTest(unittest.TestCase): """Test that font widgets enable users to make font changes. |