Skip to content

Commit e271ca7

Browse files
bpo-34189: Add simple tests for new Tk widget options. (GH-8396)
1 parent cb9c299 commit e271ca7

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

Lib/tkinter/test/test_tkinter/test_widgets.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase):
703703
'disabledforeground', 'exportselection',
704704
'font', 'foreground', 'height',
705705
'highlightbackground', 'highlightcolor', 'highlightthickness',
706-
'listvariable', 'relief',
706+
'justify', 'listvariable', 'relief',
707707
'selectbackground', 'selectborderwidth', 'selectforeground',
708708
'selectmode', 'setgrid', 'state',
709709
'takefocus', 'width', 'xscrollcommand', 'yscrollcommand',
@@ -717,6 +717,10 @@ def test_activestyle(self):
717717
self.checkEnumParam(widget, 'activestyle',
718718
'dotbox', 'none', 'underline')
719719

720+
@requires_tcl(8, 6, 5)
721+
def test_justify(self):
722+
AbstractWidgetTest.test_justify(self)
723+
720724
def test_listvariable(self):
721725
widget = self.create()
722726
var = tkinter.DoubleVar(self.root)
@@ -951,7 +955,9 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
951955
OPTIONS = (
952956
'background', 'borderwidth', 'cursor',
953957
'handlepad', 'handlesize', 'height',
954-
'opaqueresize', 'orient', 'relief',
958+
'opaqueresize', 'orient',
959+
'proxybackground', 'proxyborderwidth', 'proxyrelief',
960+
'relief',
955961
'sashcursor', 'sashpad', 'sashrelief', 'sashwidth',
956962
'showhandle', 'width',
957963
)
@@ -978,6 +984,23 @@ def test_opaqueresize(self):
978984
widget = self.create()
979985
self.checkBooleanParam(widget, 'opaqueresize')
980986

987+
@requires_tcl(8, 6, 5)
988+
def test_proxybackground(self):
989+
widget = self.create()
990+
self.checkColorParam(widget, 'proxybackground')
991+
992+
@requires_tcl(8, 6, 5)
993+
def test_proxyborderwidth(self):
994+
widget = self.create()
995+
self.checkPixelsParam(widget, 'proxyborderwidth',
996+
0, 1.3, 2.9, 6, -2, '10p',
997+
conv=noconv)
998+
999+
@requires_tcl(8, 6, 5)
1000+
def test_proxyrelief(self):
1001+
widget = self.create()
1002+
self.checkReliefParam(widget, 'proxyrelief')
1003+
9811004
def test_sashcursor(self):
9821005
widget = self.create()
9831006
self.checkCursorParam(widget, 'sashcursor')

0 commit comments

Comments
 (0)