Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
38ebdf52
Commit
38ebdf52
authored
Jun 07, 2014
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
Patch by Saimadhav Heblikar.
parent
4a3f135c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Lib/idlelib/idle_test/test_autocomplete.py
Lib/idlelib/idle_test/test_autocomplete.py
+10
-3
No files found.
Lib/idlelib/idle_test/test_autocomplete.py
View file @
38ebdf52
...
...
@@ -5,7 +5,6 @@ from tkinter import Tk, Text, TclError
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 @@ class AutoCompleteWindow:
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 @@ class AutoCompleteTest(unittest.TestCase):
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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment