mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (#2936)
Add clear method for tests. Adjust tests to use global instance. Remove unneeded ConfigDialog method.
This commit is contained in:
parent
5b59154c0d
commit
5d0f30aae5
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