diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-05 19:04:54 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-05 19:04:54 (GMT) |
commit | 0a4b07be0d886e687906acee25db391b4533fcc0 (patch) | |
tree | 383ad27f676807901d44a45f53056cb88a7b1744 /Lib/lib-tk | |
parent | 3ecd17e2b266085021fb02eb33a7e982e21d52e3 (diff) | |
download | cpython-0a4b07be0d886e687906acee25db391b4533fcc0.zip cpython-0a4b07be0d886e687906acee25db391b4533fcc0.tar.gz cpython-0a4b07be0d886e687906acee25db391b4533fcc0.tar.bz2 |
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085).
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/test/test_tkinter/test_widgets.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/lib-tk/test/test_tkinter/test_widgets.py b/Lib/lib-tk/test/test_tkinter/test_widgets.py index f0a4eeb..e1a2607 100644 --- a/Lib/lib-tk/test/test_tkinter/test_widgets.py +++ b/Lib/lib-tk/test/test_tkinter/test_widgets.py @@ -329,12 +329,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() |