[Python-checkins] cpython: Issue #22334: Add debug traces to test_tcl

victor.stinner python-checkins at python.org
Thu Sep 4 09:53:32 CEST 2014


http://hg.python.org/cpython/rev/e6cfbc3e2ed9
changeset:   92331:e6cfbc3e2ed9
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Sep 04 09:53:16 2014 +0200
summary:
  Issue #22334: Add debug traces to test_tcl

files:
  Lib/test/test_tcl.py |  8 ++++++--
  1 files changed, 6 insertions(+), 2 deletions(-)


diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -499,8 +499,9 @@
                 (1, '2', (3.4,)) if self.wantobjects else
                 ('1', '2', '3.4')),
         ]
+        tk_patchlevel = get_tk_patchlevel()
         if tcl_version >= (8, 5):
-            if not self.wantobjects or get_tk_patchlevel() < (8, 5, 5):
+            if not self.wantobjects or tk_patchlevel < (8, 5, 5):
                 # Before 8.5.5 dicts were converted to lists through string
                 expected = ('12', '\u20ac', '\xe2\x82\xac', '3.4')
             else:
@@ -509,8 +510,11 @@
                 (call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),
                     expected),
             ]
+        dbg_info = ('want objects? %s, Tcl version: %s, Tk patchlevel: %s'
+                    % (self.wantobjects, tcl_version, tk_patchlevel))
         for arg, res in testcases:
-            self.assertEqual(splitlist(arg), res, msg=arg)
+            self.assertEqual(splitlist(arg), res,
+                             'arg=%a, %s' % (arg, dbg_info))
         self.assertRaises(TclError, splitlist, '{')
 
     def test_split(self):

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


More information about the Python-checkins mailing list