Skip to content

Commit 1318d04

Browse files
committed
Adjust no_round for Canvas and Scrollbar.
1 parent ee186de commit 1318d04

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Lib/test/test_tkinter/test_widgets.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,9 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase):
754754
'yscrollcommand', 'yscrollincrement', 'width',
755755
)
756756
_rounds_pixels = True
757-
_no_round = {'borderwidth', 'height', 'highlightthickness', 'width',
758-
'xscrollincrement', 'yscrollincrement'}
757+
if tk_version >= (9, 0):
758+
_no_round = {'borderwidth', 'height', 'highlightthickness', 'width',
759+
'xscrollincrement', 'yscrollincrement'}
759760
_clipped = {'borderwidth', 'height', 'highlightthickness',
760761
'width', 'xscrollincrement', 'yscrollincrement'}
761762
_stringify = True
@@ -1224,8 +1225,9 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase):
12241225
'takefocus', 'troughcolor', 'width',
12251226
)
12261227
_rounds_pixels = True
1227-
_no_round = {'borderwidth', 'elementborderwidth', 'highlightthickness',
1228-
'width'}
1228+
if tk_version >= (9, 0):
1229+
_no_round = {'borderwidth', 'elementborderwidth', 'highlightthickness',
1230+
'width'}
12291231
if tk_version < (9, 0):
12301232
_clipped = {'highlightthickness'}
12311233
else:

0 commit comments

Comments
 (0)