diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-05 19:06:05 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-05 19:06:05 (GMT) |
commit | 96c01686aac9e0b3cc606b7328268985d2b1fb85 (patch) | |
tree | 79e5dd27b6390f7033039a2af1f38fcbbded66b0 /Lib | |
parent | 17972a746a28db8d91416e3da06d5168ec741d69 (diff) | |
parent | 8f9f5870d3c1ed62710437e14d227ab1e95efcf7 (diff) | |
download | cpython-96c01686aac9e0b3cc606b7328268985d2b1fb85.zip cpython-96c01686aac9e0b3cc606b7328268985d2b1fb85.tar.gz cpython-96c01686aac9e0b3cc606b7328268985d2b1fb85.tar.bz2 |
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085).
Diffstat (limited to 'Lib')
-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 78ba14f..1e955ca 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() |