66
77import tkinter .test .support as support
88from tkinter .test .test_ttk .test_functions import MockTclObj
9- from tkinter .test .support import tcl_version
9+ from tkinter .test .support import tcl_version , get_tk_patchlevel
1010from tkinter .test .widget_tests import (add_standard_options , noconv ,
1111 AbstractWidgetTest , StandardOptionsTests , IntegerSizeTests , PixelSizeTests ,
1212 setUpModule )
@@ -20,7 +20,7 @@ def test_class(self):
2020 widget = self .create ()
2121 self .assertEqual (widget ['class' ], '' )
2222 errmsg = 'attempt to change read-only option'
23- if tcl_version < (8 , 6 ):
23+ if get_tk_patchlevel () < (8 , 6 , 0 ): # actually this was changed in 8.6b3
2424 errmsg = 'Attempt to change read-only option'
2525 self .checkInvalidParam (widget , 'class' , 'Foo' , errmsg = errmsg )
2626 widget2 = self .create (class_ = 'Foo' )
@@ -576,7 +576,7 @@ def test_orient(self):
576576 widget = self .create ()
577577 self .assertEqual (str (widget ['orient' ]), 'vertical' )
578578 errmsg = 'attempt to change read-only option'
579- if tcl_version < (8 , 6 ):
579+ if get_tk_patchlevel () < (8 , 6 , 0 ): # actually this was changen in 8.6b3
580580 errmsg = 'Attempt to change read-only option'
581581 self .checkInvalidParam (widget , 'orient' , 'horizontal' ,
582582 errmsg = errmsg )
0 commit comments