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

Skip to content

Commit e0837a0

Browse files
Try to fix some ttk tests. Error messages were changed in 8.6b3.
1 parent 4637538 commit e0837a0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/tkinter/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 tkinter.test.support as support
88
from 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
1010
from 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

Comments
 (0)