summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-04 20:11:12 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-04 20:11:12 (GMT)
commit8d8599ce0cc6b7ec2b7e1c43fc7f59b103ee7fe9 (patch)
treee6ffab222f772b8da213dfebe9789d10f0441ae8 /Lib/tkinter
parent975708ab4fb622be7336f33893489a207c774bad (diff)
downloadcpython-8d8599ce0cc6b7ec2b7e1c43fc7f59b103ee7fe9.zip
cpython-8d8599ce0cc6b7ec2b7e1c43fc7f59b103ee7fe9.tar.gz
cpython-8d8599ce0cc6b7ec2b7e1c43fc7f59b103ee7fe9.tar.bz2
Issue #19085: Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.12.
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/test/widget_tests.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/tkinter/test/widget_tests.py
index 83db28b..28cc986 100644
--- a/Lib/tkinter/test/widget_tests.py
+++ b/Lib/tkinter/test/widget_tests.py
@@ -8,10 +8,22 @@ from tkinter.test.support import (tcl_version, requires_tcl, pixels_conv,
noconv = str if tcl_version < (8, 5) else False
+pixels_round = round
+if tcl_version[:2] == (8, 5):
+ # Issue #19085: Workaround a bug in Tk
+ # http://core.tcl.tk/tk/info/3497848
+ root = setup_master()
+ patchlevel = root.call('info', 'patchlevel')
+ patchlevel = tuple(map(int, patchlevel.split('.')))
+ if patchlevel < (8, 5, 12):
+ pixels_round = int
+ del root
+
+
_sentinel = object()
class AbstractWidgetTest:
- _conv_pixels = round
+ _conv_pixels = pixels_round
_conv_pad_pixels = None
wantobjects = True