diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-05 19:05:10 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-05 19:05:10 (GMT) |
commit | 8f9f5870d3c1ed62710437e14d227ab1e95efcf7 (patch) | |
tree | e88317bd47b1a2dc8c6581112ff11c5e7834d8ad /Lib/tkinter/test/test_tkinter/test_widgets.py | |
parent | 98555f3ac74d7120fd0dd114fe9422c106f0a137 (diff) | |
download | cpython-8f9f5870d3c1ed62710437e14d227ab1e95efcf7.zip cpython-8f9f5870d3c1ed62710437e14d227ab1e95efcf7.tar.gz cpython-8f9f5870d3c1ed62710437e14d227ab1e95efcf7.tar.bz2 |
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085).
Diffstat (limited to 'Lib/tkinter/test/test_tkinter/test_widgets.py')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_widgets.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 8a768ed..32b1e5d 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -332,12 +332,12 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase): def test_insertwidth(self): widget = self.create() self.checkPixelsParam(widget, 'insertwidth', 1.3, 3.6, '10p') - if tcl_version[:2] == (8, 5): - self.checkParam(widget, 'insertwidth', 0.9, expected=2) - else: - self.checkParam(widget, 'insertwidth', 0.9, expected=1) self.checkParam(widget, 'insertwidth', 0.1, expected=2) self.checkParam(widget, 'insertwidth', -2, expected=2) + if pixels_round(0.9) <= 0: + self.checkParam(widget, 'insertwidth', 0.9, expected=2) + else: + self.checkParam(widget, 'insertwidth', 0.9) def test_invalidcommand(self): widget = self.create() |