summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-07-22 16:50:14 (GMT)
committerGitHub <noreply@github.com>2018-07-22 16:50:14 (GMT)
commite271ca78e37a502b3dc1036f824aa3999efcd56b (patch)
tree54f1e90368d9f86cd58ad7f7602b7c63a268d172 /Lib/tkinter
parentcb9c299a55c244f77563c60e5a4afcc2221eac21 (diff)
downloadcpython-e271ca78e37a502b3dc1036f824aa3999efcd56b.zip
cpython-e271ca78e37a502b3dc1036f824aa3999efcd56b.tar.gz
cpython-e271ca78e37a502b3dc1036f824aa3999efcd56b.tar.bz2
bpo-34189: Add simple tests for new Tk widget options. (GH-8396)
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index 81b52ea..cd2a380 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -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')