File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed
Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ Released on 2020-10-05?
33======================================
44
55
6- bpo-39050: Make Settings dialog Help button work again.
6+ bpo-39388: Settings dialog Cancel button cancels pending changes.
7+
8+ bpo-39050: Settings dialog Help button again displays help text.
79
810bpo-32989: Add tests for editor newline_and_indent_event method.
911Remove unneeded arguments and dead code from pyparse
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ def cancel(self):
191191 Methods:
192192 destroy: inherited
193193 """
194+ changes .clear ()
194195 self .destroy ()
195196
196197 def destroy (self ):
Original file line number Diff line number Diff line change @@ -47,17 +47,24 @@ def tearDownModule():
4747 root .destroy ()
4848 root = dialog = None
4949
50- class ConfigDialogTest (unittest .TestCase ):
5150
52- def test_help (self ):
51+ class DialogTest (unittest .TestCase ):
52+
53+ @mock .patch (__name__ + '.dialog.destroy' , new_callable = Func )
54+ def test_cancel (self , destroy ):
55+ changes ['main' ]['something' ] = 1
56+ dialog .cancel ()
57+ self .assertEqual (changes ['main' ], {})
58+ self .assertEqual (destroy .called , 1 )
59+
60+ @mock .patch ('idlelib.configdialog.view_text' , new_callable = Func )
61+ def test_help (self , view ):
5362 dialog .note .select (dialog .keyspage )
54- saved = configdialog .view_text
55- view = configdialog .view_text = Func ()
5663 dialog .help ()
5764 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
65+ self .assertTrue (s .startswith ('When you click' ) and
66+ s .endswith ('a different name.\n ' ))
67+
6168
6269class FontPageTest (unittest .TestCase ):
6370 """Test that font widgets enable users to make font changes.
Original file line number Diff line number Diff line change 1+ IDLE Settings Cancel button now cancels pending changes
You can’t perform that action at this time.
0 commit comments