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
c75c1e0e
Commit
c75c1e0e
authored
Jul 22, 2018
by
Serhiy Storchaka
Committed by
GitHub
Jul 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-34189: Fix checking for bugfix Tcl version. (GH-8397)
parent
e271ca78
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
Lib/tkinter/test/support.py
Lib/tkinter/test/support.py
+13
-1
Lib/tkinter/test/test_tkinter/test_widgets.py
Lib/tkinter/test/test_tkinter/test_widgets.py
+1
-3
No files found.
Lib/tkinter/test/support.py
View file @
c75c1e0e
import
functools
import
re
import
re
import
tkinter
import
tkinter
import
unittest
import
unittest
...
@@ -54,9 +55,20 @@ import _tkinter
...
@@ -54,9 +55,20 @@ import _tkinter
tcl_version
=
tuple
(
map
(
int
,
_tkinter
.
TCL_VERSION
.
split
(
'.'
)))
tcl_version
=
tuple
(
map
(
int
,
_tkinter
.
TCL_VERSION
.
split
(
'.'
)))
def
requires_tcl
(
*
version
):
def
requires_tcl
(
*
version
):
if
len
(
version
)
<=
2
:
return
unittest
.
skipUnless
(
tcl_version
>=
version
,
return
unittest
.
skipUnless
(
tcl_version
>=
version
,
'requires Tcl version >= '
+
'.'
.
join
(
map
(
str
,
version
)))
'requires Tcl version >= '
+
'.'
.
join
(
map
(
str
,
version
)))
def
deco
(
test
):
@
functools
.
wraps
(
test
)
def
newtest
(
self
):
if
get_tk_patchlevel
()
<
(
8
,
6
,
5
):
self
.
skipTest
(
'requires Tcl version >= '
+
'.'
.
join
(
map
(
str
,
get_tk_patchlevel
())))
test
(
self
)
return
newtest
return
deco
_tk_patchlevel
=
None
_tk_patchlevel
=
None
def
get_tk_patchlevel
():
def
get_tk_patchlevel
():
global
_tk_patchlevel
global
_tk_patchlevel
...
...
Lib/tkinter/test/test_tkinter/test_widgets.py
View file @
c75c1e0e
...
@@ -717,9 +717,7 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase):
...
@@ -717,9 +717,7 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase):
self
.
checkEnumParam
(
widget
,
'activestyle'
,
self
.
checkEnumParam
(
widget
,
'activestyle'
,
'dotbox'
,
'none'
,
'underline'
)
'dotbox'
,
'none'
,
'underline'
)
@
requires_tcl
(
8
,
6
,
5
)
test_justify
=
requires_tcl
(
8
,
6
,
5
)(
StandardOptionsTests
.
test_justify
)
def
test_justify
(
self
):
AbstractWidgetTest
.
test_justify
(
self
)
def
test_listvariable
(
self
):
def
test_listvariable
(
self
):
widget
=
self
.
create
()
widget
=
self
.
create
()
...
...
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