]> granicus.if.org Git - python/commitdiff
Try to fix some ttk tests. Error messages were changed in 8.6b3.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Jan 2014 22:09:50 +0000 (00:09 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 10 Jan 2014 22:09:50 +0000 (00:09 +0200)
Lib/lib-tk/test/test_ttk/test_widgets.py

index 64eaf612d419a4a276d24b0e7b8209f49a614bd8..15c2d54419b91d22173cf19ab0ecc496c16e5147 100644 (file)
@@ -6,7 +6,7 @@ import sys
 
 import support
 from test_functions import MockTclObj, MockStateSpec
-from support import tcl_version
+from support import tcl_version, get_tk_patchlevel
 from widget_tests import (add_standard_options, noconv, noconv_meth,
     AbstractWidgetTest, StandardOptionsTests,
     IntegerSizeTests, PixelSizeTests,
@@ -21,7 +21,7 @@ class StandardTtkOptionsTests(StandardOptionsTests):
         widget = self.create()
         self.assertEqual(widget['class'], '')
         errmsg='attempt to change read-only option'
-        if tcl_version < (8, 6, 0): # actually this was changen in 8.6b3
+        if get_tk_patchlevel() < (8, 6, 0): # actually this was changen in 8.6b3
             errmsg='Attempt to change read-only option'
         self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
         widget2 = self.create(class_='Foo')
@@ -577,7 +577,7 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
         widget = self.create()
         self.assertEqual(str(widget['orient']), 'vertical')
         errmsg='attempt to change read-only option'
-        if tcl_version < (8, 6):
+        if get_tk_patchlevel() < (8, 6, 0): # actually this was changen in 8.6b3
             errmsg='Attempt to change read-only option'
         self.checkInvalidParam(widget, 'orient', 'horizontal',
                 errmsg=errmsg)