bpo-34189: Add simple tests for new Tk widget options. (GH-8396)

This commit is contained in:
Serhiy Storchaka 2018-07-22 19:50:14 +03:00 committed by GitHub
parent cb9c299a55
commit e271ca78e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 2 deletions

View File

@ -703,7 +703,7 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase):
'disabledforeground', 'exportselection',
'font', 'foreground', 'height',
'highlightbackground', 'highlightcolor', 'highlightthickness',
'listvariable', 'relief',
'justify', 'listvariable', 'relief',
'selectbackground', 'selectborderwidth', 'selectforeground',
'selectmode', 'setgrid', 'state',
'takefocus', 'width', 'xscrollcommand', 'yscrollcommand',
@ -717,6 +717,10 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase):
self.checkEnumParam(widget, 'activestyle',
'dotbox', 'none', 'underline')
@requires_tcl(8, 6, 5)
def test_justify(self):
AbstractWidgetTest.test_justify(self)
def test_listvariable(self):
widget = self.create()
var = tkinter.DoubleVar(self.root)
@ -951,7 +955,9 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
OPTIONS = (
'background', 'borderwidth', 'cursor',
'handlepad', 'handlesize', 'height',
'opaqueresize', 'orient', 'relief',
'opaqueresize', 'orient',
'proxybackground', 'proxyborderwidth', 'proxyrelief',
'relief',
'sashcursor', 'sashpad', 'sashrelief', 'sashwidth',
'showhandle', 'width',
)
@ -978,6 +984,23 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
widget = self.create()
self.checkBooleanParam(widget, 'opaqueresize')
@requires_tcl(8, 6, 5)
def test_proxybackground(self):
widget = self.create()
self.checkColorParam(widget, 'proxybackground')
@requires_tcl(8, 6, 5)
def test_proxyborderwidth(self):
widget = self.create()
self.checkPixelsParam(widget, 'proxyborderwidth',
0, 1.3, 2.9, 6, -2, '10p',
conv=noconv)
@requires_tcl(8, 6, 5)
def test_proxyrelief(self):
widget = self.create()
self.checkReliefParam(widget, 'proxyrelief')
def test_sashcursor(self):
widget = self.create()
self.checkCursorParam(widget, 'sashcursor')