mirror of
https://github.com/python/cpython.git
synced 2025-10-05 06:31:48 +00:00
[3.6] bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (GH-2936) (#2937)
Add clear method for tests. Adjust tests to use global instance.
Remove unneeded ConfigDialog method.
(cherry picked from commit 5d0f30a
)
This commit is contained in:
parent
02f88d2a41
commit
ecc80b3f1b
2 changed files with 23 additions and 16 deletions
|
@ -99,7 +99,6 @@ class ConfigDialog(Toplevel):
|
|||
create_page_extensions
|
||||
create_action_buttons
|
||||
load_configs: Load pages except for extensions.
|
||||
remove_var_callbacks
|
||||
activate_config_changes: Tell editors to reload.
|
||||
"""
|
||||
self.tab_pages = TabbedPageSet(self,
|
||||
|
@ -133,10 +132,6 @@ class ConfigDialog(Toplevel):
|
|||
self.load_general_cfg()
|
||||
# note: extension page handled separately
|
||||
|
||||
def remove_var_callbacks(self):
|
||||
"Remove callbacks to prevent memory leaks."
|
||||
tracers.detach()
|
||||
|
||||
def create_action_buttons(self):
|
||||
"""Return frame of action buttons for dialog.
|
||||
|
||||
|
@ -1846,6 +1841,11 @@ class VarTrace:
|
|||
self.untraced = []
|
||||
self.traced = []
|
||||
|
||||
def clear(self):
|
||||
"Clear lists (for tests)."
|
||||
self.untraced.clear()
|
||||
self.traced.clear()
|
||||
|
||||
def add(self, var, callback):
|
||||
"""Add (var, callback) tuple to untraced list.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue