diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-04 22:11:12 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-04 22:11:12 +0200 |
commit | 270fe3c6261d2541821cca6a40fd756e7656c5f5 (patch) | |
tree | 0da0da64d00ff5735009f38c6e991a46931913ba /Lib/tkinter/test/widget_tests.py | |
parent | c19ec379ce30abcc08c4df2425a6b6cc0f3b53c0 (diff) | |
download | cpython-270fe3c6261d2541821cca6a40fd756e7656c5f5.tar.gz |
Issue #19085: Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.12.
Diffstat (limited to 'Lib/tkinter/test/widget_tests.py')
-rw-r--r-- | Lib/tkinter/test/widget_tests.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/tkinter/test/widget_tests.py index 83db28b8af..28cc986179 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 |