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
e7607d4d
Commit
e7607d4d
authored
Aug 31, 2016
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #27922: IDLE tests no longer flash tk widgets.
parent
56c51523
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
5 deletions
+13
-5
Lib/idlelib/idle_test/test_configdialog.py
Lib/idlelib/idle_test/test_configdialog.py
+1
-0
Lib/idlelib/idle_test/test_editmenu.py
Lib/idlelib/idle_test/test_editmenu.py
+1
-0
Lib/idlelib/idle_test/test_hyperparser.py
Lib/idlelib/idle_test/test_hyperparser.py
+1
-0
Lib/idlelib/idle_test/test_textview.py
Lib/idlelib/idle_test/test_textview.py
+8
-5
Lib/idlelib/idle_test/test_widgetredir.py
Lib/idlelib/idle_test/test_widgetredir.py
+2
-0
No files found.
Lib/idlelib/idle_test/test_configdialog.py
View file @
e7607d4d
...
...
@@ -16,6 +16,7 @@ class ConfigDialogTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
_initializeTkVariantTests
(
cls
.
root
)
@
classmethod
...
...
Lib/idlelib/idle_test/test_editmenu.py
View file @
e7607d4d
...
...
@@ -18,6 +18,7 @@ class PasteTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
root
=
tk
.
Tk
()
root
.
withdraw
()
PyShell
.
fix_x11_paste
(
root
)
cls
.
text
=
tk
.
Text
(
root
)
cls
.
entry
=
tk
.
Entry
(
root
)
...
...
Lib/idlelib/idle_test/test_hyperparser.py
View file @
e7607d4d
...
...
@@ -36,6 +36,7 @@ class HyperParserTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
text
=
Text
(
cls
.
root
)
cls
.
editwin
=
DummyEditwin
(
cls
.
text
)
...
...
Lib/idlelib/idle_test/test_textview.py
View file @
e7607d4d
...
...
@@ -9,7 +9,7 @@ from idlelib.idle_test.mock_idle import Func
from
idlelib.idle_test.mock_tk
import
Mbox
class
TV
(
tv
.
TextViewer
):
#
used by
TextViewTest
class
TV
(
tv
.
TextViewer
):
#
Use in
TextViewTest
transient
=
Func
()
grab_set
=
Func
()
wait_window
=
Func
()
...
...
@@ -20,6 +20,7 @@ class textviewClassTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
@
classmethod
def
tearDownClass
(
cls
):
...
...
@@ -50,8 +51,8 @@ class textviewClassTest(unittest.TestCase):
view
.
destroy
=
Func
()
view
.
Ok
()
self
.
assertTrue
(
view
.
destroy
.
called
)
del
view
.
destroy
#
unmask real function
view
.
destroy
del
view
.
destroy
#
Unmask the real function.
view
.
destroy
()
class
ViewFunctionTest
(
unittest
.
TestCase
):
...
...
@@ -60,6 +61,7 @@ class ViewFunctionTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
orig_mbox
=
tv
.
tkMessageBox
tv
.
tkMessageBox
=
Mbox
...
...
@@ -71,9 +73,10 @@ class ViewFunctionTest(unittest.TestCase):
del
cls
.
orig_mbox
def
test_view_text
(
self
):
# If modal True,
tkinter will error with 'can't invoke "event" command'
# If modal True,
get tkinter error 'can't invoke "event" command'.
view
=
tv
.
view_text
(
self
.
root
,
'Title'
,
'test text'
,
modal
=
False
)
self
.
assertIsInstance
(
view
,
tv
.
TextViewer
)
view
.
Ok
()
def
test_view_file
(
self
):
test_dir
=
os
.
path
.
dirname
(
__file__
)
...
...
@@ -83,7 +86,7 @@ class ViewFunctionTest(unittest.TestCase):
self
.
assertIn
(
'Test'
,
view
.
textView
.
get
(
'1.0'
,
'1.end'
))
view
.
Ok
()
# Mock messagebox will be used
and view_file will not return anything
# Mock messagebox will be used
; view_file will return None.
testfile
=
os
.
path
.
join
(
test_dir
,
'../notthere.py'
)
view
=
tv
.
view_file
(
self
.
root
,
'Title'
,
testfile
,
modal
=
False
)
self
.
assertIsNone
(
view
)
...
...
Lib/idlelib/idle_test/test_widgetredir.py
View file @
e7607d4d
...
...
@@ -15,6 +15,7 @@ class InitCloseTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
text
=
Text
(
cls
.
root
)
@
classmethod
...
...
@@ -44,6 +45,7 @@ class WidgetRedirectorTest(unittest.TestCase):
def
setUpClass
(
cls
):
requires
(
'gui'
)
cls
.
root
=
Tk
()
cls
.
root
.
withdraw
()
cls
.
text
=
Text
(
cls
.
root
)
@
classmethod
...
...
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