diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-09 19:16:19 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-09 19:16:19 (GMT) |
commit | affb9b255bffd032e90dc9e3a73f5053cdd0cd61 (patch) | |
tree | 109e6609c74e1b26ed73caf8016138594da52925 /Lib/tkinter/test/test_tkinter/test_widgets.py | |
parent | 2915933f4f95f2c3fe12074031585e15e9285d52 (diff) | |
download | cpython-affb9b255bffd032e90dc9e3a73f5053cdd0cd61.zip cpython-affb9b255bffd032e90dc9e3a73f5053cdd0cd61.tar.gz cpython-affb9b255bffd032e90dc9e3a73f5053cdd0cd61.tar.bz2 |
Fix Tkinter tests on Tk 8.5 with patchlevel < 8.5.11 (issue #19085).
Diffstat (limited to 'Lib/tkinter/test/test_tkinter/test_widgets.py')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_widgets.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 0b44132..ed4914f 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -3,7 +3,8 @@ import tkinter import os from test.support import requires -from tkinter.test.support import tcl_version, requires_tcl, widget_eq +from tkinter.test.support import (tcl_version, requires_tcl, + get_tk_patchlevel, widget_eq) from tkinter.test.widget_tests import ( add_standard_options, noconv, pixels_round, AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests) @@ -539,7 +540,7 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): def test_selectborderwidth(self): widget = self.create() self.checkPixelsParam(widget, 'selectborderwidth', - 1.3, 2.6, -2, '10p', conv=False, + 1.3, 2.6, -2, '10p', conv=noconv, keep_orig=tcl_version >= (8, 5)) def test_spacing1(self): @@ -580,7 +581,11 @@ class TextTest(AbstractWidgetTest, unittest.TestCase): def test_tabs(self): widget = self.create() - self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i')) + if get_tk_patchlevel() < (8, 5, 11): + self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i'), + expected=('10.2', '20.7', '1i', '2i')) + else: + self.checkParam(widget, 'tabs', (10.2, 20.7, '1i', '2i')) self.checkParam(widget, 'tabs', '10.2 20.7 1i 2i', expected=('10.2', '20.7', '1i', '2i')) self.checkParam(widget, 'tabs', '2c left 4c 6c center', |