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

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

`

700

700

`'disabledforeground', 'exportselection',

`

701

701

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

`

702

702

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

`

703

``

`-

'listvariable', 'relief',

`

``

703

`+

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

`

704

704

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

`

705

705

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

`

706

706

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

`

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

`

714

714

`self.checkEnumParam(widget, 'activestyle',

`

715

715

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

`

716

716

``

``

717

`+

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

`

``

718

+

717

719

`def test_listvariable(self):

`

718

720

`widget = self.create()

`

719

721

`var = tkinter.DoubleVar(self.root)

`

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

`

947

949

`OPTIONS = (

`

948

950

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

`

949

951

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

`

950

``

`-

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

`

``

952

`+

'opaqueresize', 'orient',

`

``

953

`+

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

`

``

954

`+

'relief',

`

951

955

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

`

952

956

`'showhandle', 'width',

`

953

957

` )

`

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

`

974

978

`widget = self.create()

`

975

979

`self.checkBooleanParam(widget, 'opaqueresize')

`

976

980

``

``

981

`+

@requires_tcl(8, 6, 5)

`

``

982

`+

def test_proxybackground(self):

`

``

983

`+

widget = self.create()

`

``

984

`+

self.checkColorParam(widget, 'proxybackground')

`

``

985

+

``

986

`+

@requires_tcl(8, 6, 5)

`

``

987

`+

def test_proxyborderwidth(self):

`

``

988

`+

widget = self.create()

`

``

989

`+

self.checkPixelsParam(widget, 'proxyborderwidth',

`

``

990

`+

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

`

``

991

`+

conv=noconv)

`

``

992

+

``

993

`+

@requires_tcl(8, 6, 5)

`

``

994

`+

def test_proxyrelief(self):

`

``

995

`+

widget = self.create()

`

``

996

`+

self.checkReliefParam(widget, 'proxyrelief')

`

``

997

+

977

998

`def test_sashcursor(self):

`

978

999

`widget = self.create()

`

979

1000

`self.checkCursorParam(widget, 'sashcursor')

`