[issue31130] test_idle: idlelib.configdialog leaks references
STINNER Victor
report at bugs.python.org
Mon Aug 7 05:54:21 EDT 2017
STINNER Victor added the comment:
I don't know anything about idlelib, but it seems like the following patch fixes the failing test:
diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py
index aff3c2f..9f495fd 100644
--- a/Lib/idlelib/idle_test/test_configdialog.py
+++ b/Lib/idlelib/idle_test/test_configdialog.py
@@ -41,6 +41,7 @@ def tearDownModule():
global root, dialog
idleConf.userCfg = usercfg
tracers.detach()
+ tracers.clear()
del dialog
root.update_idletasks()
root.destroy()
Extract of ConfigDialog.create_page_highlight():
self.builtin_theme = tracers.add(
StringVar(parent), self.var_changed_builtin_theme)
This method contains many tracers.add() calls, but tearDownModule() of Lib/idlelib/idle_test/test_configdialog.py only calls "tracers.detach()" and detatch() doesn't clear VarTrace.untraced list.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31130>
_______________________________________
More information about the Python-bugs-list
mailing list