@@ -627,9 +627,9 @@ class TextTest(AbstractWidgetTest, unittest.TestCase):
627627 if tk_version < (9 , 0 ):
628628 _clipped = {'highlightthickness' , 'spacing1' , 'spacing2' , 'spacing3' }
629629 else :
630- _clipped = {'borderwidth' , 'highlightthickness ' , 'insertborderwidth ' ,
631- 'insertwidth ' , 'padx ' , 'pady ' , 'selectborderwidth ' ,
632- 'spacing1' , 'spacing2' , 'spacing3' }
630+ _clipped = {'borderwidth' , 'height ' , 'highlightthickness ' ,
631+ 'insertborderwidth ' , 'insertwidth ' , 'padx ' , 'pady ' ,
632+ 'selectborderwidth' , ' spacing1' , 'spacing2' , 'spacing3' }
633633
634634 def create (self , ** kwargs ):
635635 return tkinter .Text (self .root , ** kwargs )
@@ -658,12 +658,11 @@ def test_configure_endline(self):
658658 def test_configure_height (self ):
659659 widget = self .create ()
660660 self .checkPixelsParam (widget , 'height' , 100 , 101.2 , 102.6 , '3c' )
661- expected = 1 if tk_version < (9 , 0 ) else 0
662- self .checkParam (widget , 'height' , 0 , expected = expected )
663- if tk_version < (9 , 1 ):
664- self .checkParam (widget , 'height' , - 100 , expected = expected )
661+ if tk_version < (9 , 0 ):
662+ self .checkParam (widget , 'height' , 0 , expected = 1 )
663+ self .checkParam (widget , 'height' , - 100 , expected = 1 )
665664 else :
666- self .checkInvalidParam (widget , 'height' , - 100 )
665+ self .checkPixelsParam (widget , 'height' , 0 , - 100 )
667666
668667 def test_configure_maxundo (self ):
669668 widget = self .create ()
@@ -1238,9 +1237,10 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase):
12381237 if tk_version < (8 , 7 ):
12391238 _clipped = {'highlightthickness' }
12401239 elif tk_version < (9 , 0 ):
1241- _clipped = {'borderwidth' , 'highlightthickness' }
1240+ _clipped = {'borderwidth' , 'elementborderwidth' , ' highlightthickness' }
12421241 else :
1243- _clipped = {'borderwidth' , 'highlightthickness' , 'width' }
1242+ _clipped = {'borderwidth' , 'elementborderwidth' , 'highlightthickness' , 'width' }
1243+ _clipped_to_default = {'elementborderwidth' }
12441244 _stringify = True
12451245 default_orient = 'vertical'
12461246
@@ -1249,8 +1249,7 @@ def create(self, **kwargs):
12491249
12501250 def test_configure_elementborderwidth (self ):
12511251 widget = self .create ()
1252- self .checkPixelsParam (widget , 'elementborderwidth' , 4.3 , 5.6 , '1m' )
1253- self .checkNegPixelParam (widget , 'elementborderwidth' , - 2 )
1252+ self .checkPixelsParam (widget , 'elementborderwidth' , 4.3 , 5.6 , - 2 , '1m' )
12541253
12551254 def test_configure_orient (self ):
12561255 widget = self .create ()
@@ -1543,7 +1542,8 @@ class MessageTest(AbstractWidgetTest, unittest.TestCase):
15431542 if tk_version < (8 , 7 ):
15441543 _clipped = {'highlightthickness' }
15451544 else :
1546- _clipped = {'borderwidth' , 'highlightthickness' , 'width' }
1545+ _clipped = {'borderwidth' , 'highlightthickness' , 'padx' , 'pady' , 'width' }
1546+ _clipped_to_default = {'padx' , 'pady' }
15471547
15481548 def create (self , ** kwargs ):
15491549 return tkinter .Message (self .root , ** kwargs )
@@ -1552,16 +1552,6 @@ def test_configure_aspect(self):
15521552 widget = self .create ()
15531553 self .checkIntegerParam (widget , 'aspect' , 250 , 0 , - 300 )
15541554
1555- def test_configure_padx (self ):
1556- widget = self .create ()
1557- self .checkPixelsParam (widget , 'padx' , 3 , 4.4 , 5.6 , '12m' )
1558- self .checkNegPixelParam (widget , 'padx' , - 2 )
1559-
1560- def test_configure_pady (self ):
1561- widget = self .create ()
1562- self .checkPixelsParam (widget , 'pady' , 3 , 4.4 , 5.6 , '12m' )
1563- self .checkNegPixelParam (widget , 'pady' , - 2 )
1564-
15651555 def test_configure_width (self ):
15661556 widget = self .create ()
15671557 self .checkPixelsParam (widget , 'width' , 402 , 403.4 , 404.6 , 0 , - 402 , '5i' )
0 commit comments