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 2019-12-16?
3
3
======================================
4
4
5
5
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.
7
9
8
10
bpo-32989: Add tests for editor newline_and_indent_event method.
9
11
Remove unneeded arguments and dead code from pyparse
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ def cancel(self):
191
191
Methods:
192
192
destroy: inherited
193
193
"""
194
+ changes .clear ()
194
195
self .destroy ()
195
196
196
197
def destroy (self ):
Original file line number Diff line number Diff line change @@ -47,17 +47,24 @@ def tearDownModule():
47
47
root .destroy ()
48
48
root = dialog = None
49
49
50
- class ConfigDialogTest (unittest .TestCase ):
51
50
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 ):
53
62
dialog .note .select (dialog .keyspage )
54
- saved = configdialog .view_text
55
- view = configdialog .view_text = Func ()
56
63
dialog .help ()
57
64
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
+
61
68
62
69
class FontPageTest (unittest .TestCase ):
63
70
"""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