Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6183f70

Browse files
Try to fix some ttk tests. Error messages were changed in 8.6b3.
1 parent ee105dc commit 6183f70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/lib-tk/test/test_ttk/test_widgets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import support
88
from test_functions import MockTclObj, MockStateSpec
9-
from support import tcl_version
9+
from support import tcl_version, get_tk_patchlevel
1010
from widget_tests import (add_standard_options, noconv, noconv_meth,
1111
AbstractWidgetTest, StandardOptionsTests,
1212
IntegerSizeTests, PixelSizeTests,
@@ -21,7 +21,7 @@ def test_class(self):
2121
widget = self.create()
2222
self.assertEqual(widget['class'], '')
2323
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
2525
errmsg='Attempt to change read-only option'
2626
self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
2727
widget2 = self.create(class_='Foo')
@@ -577,7 +577,7 @@ def test_orient(self):
577577
widget = self.create()
578578
self.assertEqual(str(widget['orient']), 'vertical')
579579
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
581581
errmsg='Attempt to change read-only option'
582582
self.checkInvalidParam(widget, 'orient', 'horizontal',
583583
errmsg=errmsg)

0 commit comments

Comments
 (0)