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
b3de1a72
Commit
b3de1a72
authored
Feb 03, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19761: Fixed Tkinter tests on OS X.
parent
1317e144
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
Lib/tkinter/test/test_tkinter/test_widgets.py
Lib/tkinter/test/test_tkinter/test_widgets.py
+5
-4
Lib/tkinter/test/widget_tests.py
Lib/tkinter/test/widget_tests.py
+9
-3
No files found.
Lib/tkinter/test/test_tkinter/test_widgets.py
View file @
b3de1a72
...
...
@@ -329,10 +329,11 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase):
self
.
checkColorParam
(
widget
,
'disabledbackground'
)
def
test_insertborderwidth
(
self
):
widget
=
self
.
create
()
self
.
checkPixelsParam
(
widget
,
'insertborderwidth'
,
0
,
1.3
,
-
2
)
self
.
checkParam
(
widget
,
'insertborderwidth'
,
2
,
expected
=
1
)
self
.
checkParam
(
widget
,
'insertborderwidth'
,
'10p'
,
expected
=
1
)
widget
=
self
.
create
(
insertwidth
=
100
)
self
.
checkPixelsParam
(
widget
,
'insertborderwidth'
,
0
,
1.3
,
2.6
,
6
,
-
2
,
'10p'
)
# insertborderwidth is bounded above by a half of insertwidth.
self
.
checkParam
(
widget
,
'insertborderwidth'
,
60
,
expected
=
100
//
2
)
def
test_insertwidth
(
self
):
widget
=
self
.
create
()
...
...
Lib/tkinter/test/widget_tests.py
View file @
b3de1a72
...
...
@@ -6,6 +6,7 @@ import tkinter
from
tkinter.ttk
import
setup_master
,
Scale
from
tkinter.test.support
import
(
tcl_version
,
requires_tcl
,
get_tk_patchlevel
,
pixels_conv
,
tcl_obj_eq
)
import
test.support
noconv
=
False
...
...
@@ -234,8 +235,14 @@ class StandardOptionsTests:
widget
=
self
.
create
()
self
.
checkParam
(
widget
,
'bitmap'
,
'questhead'
)
self
.
checkParam
(
widget
,
'bitmap'
,
'gray50'
)
self
.
checkInvalidParam
(
widget
,
'bitmap'
,
'spam'
,
errmsg
=
'bitmap "spam" not defined'
)
filename
=
test
.
support
.
findfile
(
'python.xbm'
,
subdir
=
'imghdrdata'
)
self
.
checkParam
(
widget
,
'bitmap'
,
'@'
+
filename
)
# Cocoa Tk widgets don't detect invalid -bitmap values
# See https://core.tcl.tk/tk/info/31cd33dbf0
if
not
(
'aqua'
in
self
.
root
.
tk
.
call
(
'tk'
,
'windowingsystem'
)
and
'AppKit'
in
self
.
root
.
winfo_server
()):
self
.
checkInvalidParam
(
widget
,
'bitmap'
,
'spam'
,
errmsg
=
'bitmap "spam" not defined'
)
def
test_borderwidth
(
self
):
widget
=
self
.
create
()
...
...
@@ -495,7 +502,6 @@ def add_standard_options(*source_classes):
return
decorator
def
setUpModule
():
import
test.support
if
test
.
support
.
verbose
:
tcl
=
tkinter
.
Tcl
()
print
(
'patchlevel ='
,
tcl
.
call
(
'info'
,
'patchlevel'
))
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