[Python-checkins] cpython (3.4): Use more precise Tcl version checks in tests.

serhiy.storchaka python-checkins at python.org
Thu Apr 23 09:59:18 CEST 2015


https://hg.python.org/cpython/rev/2d7e9a0418f2
changeset:   95779:2d7e9a0418f2
branch:      3.4
parent:      95776:351ad8c4f3a6
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Apr 23 10:57:40 2015 +0300
summary:
  Use more precise Tcl version checks in tests.

files:
  Lib/tkinter/test/test_tkinter/test_widgets.py |  4 ++--
  Lib/tkinter/test/test_ttk/test_widgets.py     |  6 ++++--
  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
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -1040,7 +1040,7 @@
     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"')
 
@@ -1088,7 +1088,7 @@
     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
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -352,7 +352,8 @@
                         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 @@
         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()

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list