From f4d98c37635772087018b6c3e4004ba406f08531 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 11 Sep 2017 15:42:56 -0400 Subject: [PATCH 1/3] bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an int entry is not the same as deleting and inserting because int('') will fail. --- Lib/idlelib/idle_test/test_configdialog.py | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 3d6a858e6fd2b9..cae7186415b546 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -1128,15 +1128,18 @@ def test_startup(self): def test_editor_size(self): d = self.page - d.win_height_int.insert(0, '1') - self.assertEqual(mainpage, {'EditorWindow': {'height': '140'}}) + d.win_height_int.delete(0, 'end') + d.win_height_int.insert(0, '11') + self.assertEqual(mainpage, {'EditorWindow': {'height': '11'}}) changes.clear() - d.win_width_int.insert(0, '1') - self.assertEqual(mainpage, {'EditorWindow': {'width': '180'}}) + d.win_width_int.delete(0, 'end') + d.win_width_int.insert(0, '11') + self.assertEqual(mainpage, {'EditorWindow': {'width': '11'}}) def test_autocomplete_wait(self): - self.page.auto_wait_int.insert(0, '1') - self.assertEqual(extpage, {'AutoComplete': {'popupwait': '12000'}}) + self.page.auto_wait_int.delete(0, 'end') + self.page.auto_wait_int.insert(0, '11') + self.assertEqual(extpage, {'AutoComplete': {'popupwait': '11'}}) def test_parenmatch(self): d = self.page @@ -1144,8 +1147,9 @@ def test_parenmatch(self): d.paren_style_type['menu'].invoke(0) eq(extpage, {'ParenMatch': {'style': 'opener'}}) changes.clear() - d.paren_flash_time.insert(0, '2') - eq(extpage, {'ParenMatch': {'flash-delay': '2500'}}) + d.paren_flash_time.delete(0, 'end') + d.paren_flash_time.insert(0, '11') + eq(extpage, {'ParenMatch': {'flash-delay': '11'}}) changes.clear() d.bell_on.invoke() eq(extpage, {'ParenMatch': {'bell': 'False'}}) @@ -1158,12 +1162,14 @@ def test_autosave(self): self.assertEqual(mainpage, {'General': {'autosave': '0'}}) def test_paragraph(self): - self.page.format_width_int.insert(0, '1') - self.assertEqual(extpage, {'FormatParagraph': {'max-width': '172'}}) + self.page.format_width_int.delete(0, 'end') + self.page.format_width_int.insert(0, '11') + self.assertEqual(extpage, {'FormatParagraph': {'max-width': '11'}}) def test_context(self): + self.page.context_int.delete(0, 'end') self.page.context_int.insert(0, '1') - self.assertEqual(extpage, {'CodeContext': {'numlines': '13'}}) + self.assertEqual(extpage, {'CodeContext': {'numlines': '1'}}) def test_source_selected(self): d = self.page From 7294a8bbea18baad5be297e995f18caf4608a5eb Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 11 Sep 2017 15:46:26 -0400 Subject: [PATCH 2/3] News blurb. --- Misc/NEWS.d/next/IDLE/2017-09-11-15-46-05.bpo-31414.wiepgK.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/IDLE/2017-09-11-15-46-05.bpo-31414.wiepgK.rst diff --git a/Misc/NEWS.d/next/IDLE/2017-09-11-15-46-05.bpo-31414.wiepgK.rst b/Misc/NEWS.d/next/IDLE/2017-09-11-15-46-05.bpo-31414.wiepgK.rst new file mode 100644 index 00000000000000..aa49d882d0a54e --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2017-09-11-15-46-05.bpo-31414.wiepgK.rst @@ -0,0 +1,2 @@ +IDLE -- fix tk entry box tests by deleting first. Adding to an int entry is +not the same as deleting and inserting because int('') will fail. From e08a686585b61af2074d2326274347733e404cb8 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 11 Sep 2017 16:19:21 -0400 Subject: [PATCH 3/3] bpo-30928: Update idlelib/NEWS.txt to 2017-09-11. --- Lib/idlelib/NEWS.txt | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index e78818e5be3e57..86906b80abe268 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,51 @@ Released on 2018-06-18? ======================== +bpo-bpo-31414: Fix tk entry box tests by deleting first. +Adding to an int entry is not the same as deleting and inserting +because int('') will fail. Patch by Terry Jan Reedy. + +bpo-27099: Convert IDLE's built-in 'extensions' to regular features. + About 10 IDLE features were implemented as supposedly optional +extensions. Their different behavior could be confusing or worse for +users and not good for maintenance. Hence the conversion. + The main difference for users is that user configurable key bindings +for builtin features are now handled uniformly. Now, editing a binding +in a keyset only affects its value in the keyset. All bindings are +defined together in the system-specific default keysets in config- +extensions.def. All custom keysets are saved as a whole in config- +extension.cfg. All take effect as soon as one clicks Apply or Ok. + The affected events are '<>', +'<>', '<>', '<>', +'<>', '<>', '<>', and +'<>'. Any (global) customizations made before 3.6.3 will +not affect their keyset-specific customization after 3.6.3. and vice +versa. + Inital patch by Charles Wohlganger, revised by Terry Jan Reedy. + +bpo-31051: Rearrange condigdialog General tab. +Sort non-Help options into Window (Shell+Editor) and Editor (only). +Leave room for the addition of new options. +Patch by Terry Jan Reedy. + +bpo-30617: Add docstrings and tests for outwin subclass of editor. +Move some data and functions from the class to module level. +Patch by Cheryl Sabella. + +bpo-31287: Do not modify tkinter.messagebox in test_configdialog. +Instead, mask it with an instance mock that can be deleted. +Patch by Terry Jan Reedy. + +bpo-30781: Use ttk widgets in ConfigDialog pages. +These should especially look better on MacOSX. +Patches by Terry Jan Reedy and Cheryl Sabella. + +bpo-31206: Factor HighPage(Frame) class from ConfigDialog. +Patch by Cheryl Sabella. + +bp0-31001: Add tests for configdialog highlight tab. +Patch by Cheryl Sabella. + bpo-31205: Factor KeysPage(Frame) class from ConfigDialog. The slightly modified tests continue to pass. Patch by Cheryl Sabella. @@ -32,6 +77,7 @@ broken by the switch to ttk.Notebook is fixed. Patch mostly by Cheryl Sabella. bpo-30781: IDLE - Use ttk Notebook in ConfigDialog. +This improves navigation by tabbing. Patch by Terry Jan Reedy. bpo-31060: IDLE - Finish rearranging methods of ConfigDialog.