[Python-checkins] cpython (merge 2.7 -> 2.7): Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
terry.reedy
python-checkins at python.org
Sun Jun 8 20:58:19 CEST 2014
http://hg.python.org/cpython/rev/30c2f65a6346
changeset: 91087:30c2f65a6346
branch: 2.7
parent: 91081:1a9c07880a15
parent: 91084:b8f33440cd5e
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Sun Jun 08 14:47:16 2014 -0400
summary:
Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
Patch by Saimadhav Heblikar. (2 head merge)
files:
Lib/idlelib/idle_test/test_autocomplete.py | 13 +++++++--
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py
--- a/Lib/idlelib/idle_test/test_autocomplete.py
+++ b/Lib/idlelib/idle_test/test_autocomplete.py
@@ -5,7 +5,6 @@
import idlelib.AutoComplete as ac
import idlelib.AutoCompleteWindow as acw
import idlelib.macosxSupport as mac
-from idlelib.EditorWindow import EditorWindow
from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Event
@@ -13,6 +12,14 @@
def complete():
return
+class DummyEditwin:
+ def __init__(self, root, text):
+ self.root = root
+ self.text = text
+ self.indentwidth = 8
+ self.tabwidth = 8
+ self.context_use_ps1 = True
+
class AutoCompleteTest(unittest.TestCase):
@@ -21,8 +28,8 @@
requires('gui')
cls.root = Tk()
mac.setupApp(cls.root, None)
- cls.editor = EditorWindow(root=cls.root)
- cls.text = cls.editor.text
+ cls.text = Text(cls.root)
+ cls.editor = DummyEditwin(cls.root, cls.text)
@classmethod
def tearDownClass(cls):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list