summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-23 07:58:15 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-23 07:58:15 (GMT)
commitf28d54d3b96e411be7ea3279c901fd6edc18ee4d (patch)
tree1eda8a915a7acb9a46c794b793627c2819131b05 /Lib/tkinter/test
parentb5a3d9bebb3c0019ef8464a6a0962e09b9b4b82d (diff)
parent3bd66abb947fa658f57cc9201a59d0b96585d908 (diff)
downloadcpython-f28d54d3b96e411be7ea3279c901fd6edc18ee4d.zip
cpython-f28d54d3b96e411be7ea3279c901fd6edc18ee4d.tar.gz
cpython-f28d54d3b96e411be7ea3279c901fd6edc18ee4d.tar.bz2
Use more precise Tcl version checks in tests.
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py4
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py6
2 files changed, 6 insertions, 4 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index 25b1a02..7171667 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -1041,7 +1041,7 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
def test_paneconfigure_height(self):
p, b, c = self.create2()
self.check_paneconfigure(p, b, 'height', 10, 10,
- stringify=tcl_version < (8, 5))
+ stringify=get_tk_patchlevel() < (8, 5, 11))
self.check_paneconfigure_bad(p, b, 'height',
'bad screen distance "badValue"')
@@ -1089,7 +1089,7 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
def test_paneconfigure_width(self):
p, b, c = self.create2()
self.check_paneconfigure(p, b, 'width', 10, 10,
- stringify=tcl_version < (8, 5))
+ stringify=get_tk_patchlevel() < (8, 5, 11))
self.check_paneconfigure_bad(p, b, 'width',
'bad screen distance "badValue"')
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index 9153c00..afd3230 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -352,7 +352,8 @@ class ComboboxTest(AbstractWidgetTest, unittest.TestCase):
expected=('mon', 'tue', 'wed', 'thur'))
self.checkParam(self.combo, 'values', ('mon', 'tue', 'wed', 'thur'))
self.checkParam(self.combo, 'values', (42, 3.14, '', 'any string'))
- self.checkParam(self.combo, 'values', '', expected=())
+ self.checkParam(self.combo, 'values', '',
+ expected='' if get_tk_patchlevel() < (8, 5, 10) else ())
self.combo['values'] = ['a', 1, 'c']
@@ -1125,7 +1126,8 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase):
self.checkParam(widget, 'columns', 'a b c',
expected=('a', 'b', 'c'))
self.checkParam(widget, 'columns', ('a', 'b', 'c'))
- self.checkParam(widget, 'columns', ())
+ self.checkParam(widget, 'columns', (),
+ expected='' if get_tk_patchlevel() < (8, 5, 10) else ())
def test_displaycolumns(self):
widget = self.create()