6
6
7
7
import support
8
8
from test_functions import MockTclObj , MockStateSpec
9
- from support import tcl_version
9
+ from support import tcl_version , get_tk_patchlevel
10
10
from widget_tests import (add_standard_options , noconv , noconv_meth ,
11
11
AbstractWidgetTest , StandardOptionsTests ,
12
12
IntegerSizeTests , PixelSizeTests ,
@@ -21,7 +21,7 @@ def test_class(self):
21
21
widget = self .create ()
22
22
self .assertEqual (widget ['class' ], '' )
23
23
errmsg = 'attempt to change read-only option'
24
- if tcl_version < (8 , 6 , 0 ): # actually this was changen in 8.6b3
24
+ if get_tk_patchlevel () < (8 , 6 , 0 ): # actually this was changen in 8.6b3
25
25
errmsg = 'Attempt to change read-only option'
26
26
self .checkInvalidParam (widget , 'class' , 'Foo' , errmsg = errmsg )
27
27
widget2 = self .create (class_ = 'Foo' )
@@ -577,7 +577,7 @@ def test_orient(self):
577
577
widget = self .create ()
578
578
self .assertEqual (str (widget ['orient' ]), 'vertical' )
579
579
errmsg = 'attempt to change read-only option'
580
- if tcl_version < (8 , 6 ):
580
+ if get_tk_patchlevel () < (8 , 6 , 0 ): # actually this was changen in 8.6b3
581
581
errmsg = 'Attempt to change read-only option'
582
582
self .checkInvalidParam (widget , 'orient' , 'horizontal' ,
583
583
errmsg = errmsg )
0 commit comments