summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-09-04 07:53:16 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-09-04 07:53:16 (GMT)
commitece38d9497ec5348dda473e1752d9784f7aea7c8 (patch)
treeb187a771b15a964f500f8cb05acf0ce954c8425e /Lib/test/test_tcl.py
parentb39b918baa8a6a9c3062b8fea214d86ca3b147e4 (diff)
downloadcpython-ece38d9497ec5348dda473e1752d9784f7aea7c8.zip
cpython-ece38d9497ec5348dda473e1752d9784f7aea7c8.tar.gz
cpython-ece38d9497ec5348dda473e1752d9784f7aea7c8.tar.bz2
Issue #22334: Add debug traces to test_tcl
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 5ab2877..10ee274 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -499,8 +499,9 @@ class TclTest(unittest.TestCase):
(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 @@ class TclTest(unittest.TestCase):
(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):