mirror of
https://github.com/python/cpython.git
synced 2024-12-15 21:04:00 +08:00
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel >= 8.5.12 (issue #19085).
This commit is contained in:
parent
98555f3ac7
commit
8f9f5870d3
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user