Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite37d606

Browse files
serhiy-storchakamiss-islington
authored andcommitted
bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (pythonGH-31938)
(cherry picked from commitdbbe4d2)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent0b5f99a commite37d606

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎Lib/tkinter/test/test_tkinter/test_widgets.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ def test_configure_activestyle(self):
800800
self.checkEnumParam(widget,'activestyle',
801801
'dotbox','none','underline')
802802

803-
test_justify=requires_tcl(8,6,5)(StandardOptionsTests.test_configure_justify)
803+
test_configure_justify=requires_tcl(8,6,5)(StandardOptionsTests.test_configure_justify)
804804

805805
deftest_configure_listvariable(self):
806806
widget=self.create()
@@ -939,7 +939,7 @@ def test_configure_digits(self):
939939

940940
deftest_configure_from(self):
941941
widget=self.create()
942-
conv=Falseifget_tk_patchlevel()>= (8,6,10)elsefloat_round
942+
conv=floatifget_tk_patchlevel()>= (8,6,10)elsefloat_round
943943
self.checkFloatParam(widget,'from',100,14.9,15.1,conv=conv)
944944

945945
deftest_configure_label(self):

‎Lib/tkinter/test/test_ttk/test_style.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
fromtkinterimportttk
55
fromtestimportsupport
66
fromtest.supportimportrequires
7-
fromtkinter.test.supportimportAbstractTkTest
7+
fromtkinter.test.supportimportAbstractTkTest,get_tk_patchlevel
88

99
requires('gui')
1010

@@ -170,6 +170,8 @@ def test_map_custom_copy(self):
170170
newname=f'C.{name}'
171171
self.assertEqual(style.map(newname), {})
172172
style.map(newname,**default)
173+
iftheme=='alt'andname=='.'andget_tk_patchlevel()< (8,6,1):
174+
default['embossed']= [('disabled','1')]
173175
self.assertEqual(style.map(newname),default)
174176
forkey,valueindefault.items():
175177
self.assertEqual(style.map(newname,key),value)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp