Skip to content

Commit f28d54d

Browse files
Use more precise Tcl version checks in tests.
2 parents b5a3d9b + 3bd66ab commit f28d54d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Lib/tkinter/test/test_tkinter/test_widgets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ def test_paneconfigure_before(self):
10411041
def test_paneconfigure_height(self):
10421042
p, b, c = self.create2()
10431043
self.check_paneconfigure(p, b, 'height', 10, 10,
1044-
stringify=tcl_version < (8, 5))
1044+
stringify=get_tk_patchlevel() < (8, 5, 11))
10451045
self.check_paneconfigure_bad(p, b, 'height',
10461046
'bad screen distance "badValue"')
10471047

@@ -1089,7 +1089,7 @@ def test_paneconfigure_stretch(self):
10891089
def test_paneconfigure_width(self):
10901090
p, b, c = self.create2()
10911091
self.check_paneconfigure(p, b, 'width', 10, 10,
1092-
stringify=tcl_version < (8, 5))
1092+
stringify=get_tk_patchlevel() < (8, 5, 11))
10931093
self.check_paneconfigure_bad(p, b, 'width',
10941094
'bad screen distance "badValue"')
10951095

Lib/tkinter/test/test_ttk/test_widgets.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ def check_get_current(getval, currval):
352352
expected=('mon', 'tue', 'wed', 'thur'))
353353
self.checkParam(self.combo, 'values', ('mon', 'tue', 'wed', 'thur'))
354354
self.checkParam(self.combo, 'values', (42, 3.14, '', 'any string'))
355-
self.checkParam(self.combo, 'values', '', expected=())
355+
self.checkParam(self.combo, 'values', '',
356+
expected='' if get_tk_patchlevel() < (8, 5, 10) else ())
356357

357358
self.combo['values'] = ['a', 1, 'c']
358359

@@ -1125,7 +1126,8 @@ def test_columns(self):
11251126
self.checkParam(widget, 'columns', 'a b c',
11261127
expected=('a', 'b', 'c'))
11271128
self.checkParam(widget, 'columns', ('a', 'b', 'c'))
1128-
self.checkParam(widget, 'columns', ())
1129+
self.checkParam(widget, 'columns', (),
1130+
expected='' if get_tk_patchlevel() < (8, 5, 10) else ())
11291131

11301132
def test_displaycolumns(self):
11311133
widget = self.create()

0 commit comments

Comments
 (0)