[3.6] bpo-34189: Add simple tests for new Tk widget options. (GH-8396… · python/cpython@0ff1746 (original) (raw)

`@@ -703,7 +703,7 @@ class ListboxTest(AbstractWidgetTest, unittest.TestCase):

`

703

703

`'disabledforeground', 'exportselection',

`

704

704

`'font', 'foreground', 'height',

`

705

705

`'highlightbackground', 'highlightcolor', 'highlightthickness',

`

706

``

`-

'listvariable', 'relief',

`

``

706

`+

'justify', 'listvariable', 'relief',

`

707

707

`'selectbackground', 'selectborderwidth', 'selectforeground',

`

708

708

`'selectmode', 'setgrid', 'state',

`

709

709

`'takefocus', 'width', 'xscrollcommand', 'yscrollcommand',

`

`@@ -717,6 +717,8 @@ def test_activestyle(self):

`

717

717

`self.checkEnumParam(widget, 'activestyle',

`

718

718

`'dotbox', 'none', 'underline')

`

719

719

``

``

720

`+

test_justify = requires_tcl(8, 6, 5)(StandardOptionsTests.test_justify)

`

``

721

+

720

722

`def test_listvariable(self):

`

721

723

`widget = self.create()

`

722

724

`var = tkinter.DoubleVar(self.root)

`

`@@ -951,7 +953,9 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):

`

951

953

`OPTIONS = (

`

952

954

`'background', 'borderwidth', 'cursor',

`

953

955

`'handlepad', 'handlesize', 'height',

`

954

``

`-

'opaqueresize', 'orient', 'relief',

`

``

956

`+

'opaqueresize', 'orient',

`

``

957

`+

'proxybackground', 'proxyborderwidth', 'proxyrelief',

`

``

958

`+

'relief',

`

955

959

`'sashcursor', 'sashpad', 'sashrelief', 'sashwidth',

`

956

960

`'showhandle', 'width',

`

957

961

` )

`

`@@ -978,6 +982,23 @@ def test_opaqueresize(self):

`

978

982

`widget = self.create()

`

979

983

`self.checkBooleanParam(widget, 'opaqueresize')

`

980

984

``

``

985

`+

@requires_tcl(8, 6, 5)

`

``

986

`+

def test_proxybackground(self):

`

``

987

`+

widget = self.create()

`

``

988

`+

self.checkColorParam(widget, 'proxybackground')

`

``

989

+

``

990

`+

@requires_tcl(8, 6, 5)

`

``

991

`+

def test_proxyborderwidth(self):

`

``

992

`+

widget = self.create()

`

``

993

`+

self.checkPixelsParam(widget, 'proxyborderwidth',

`

``

994

`+

0, 1.3, 2.9, 6, -2, '10p',

`

``

995

`+

conv=noconv)

`

``

996

+

``

997

`+

@requires_tcl(8, 6, 5)

`

``

998

`+

def test_proxyrelief(self):

`

``

999

`+

widget = self.create()

`

``

1000

`+

self.checkReliefParam(widget, 'proxyrelief')

`

``

1001

+

981

1002

`def test_sashcursor(self):

`

982

1003

`widget = self.create()

`

983

1004

`self.checkCursorParam(widget, 'sashcursor')

`