summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2013-09-09 12:12:21 (GMT)
committerLarry Hastings <larry@hastings.org>2013-09-09 12:12:21 (GMT)
commit8568f66daf088cf235a42288621fb4770ac48199 (patch)
tree3db459417e7c4b112b03d59661057f09ff058d07 /Lib/test/test_tcl.py
parent60560b18d29a917e64d88d47c5533743001f0787 (diff)
parent23543ebd8676384c1c5e28f7a1496777a57479d5 (diff)
downloadcpython-8568f66daf088cf235a42288621fb4770ac48199.zip
cpython-8568f66daf088cf235a42288621fb4770ac48199.tar.gz
cpython-8568f66daf088cf235a42288621fb4770ac48199.tar.bz2
Merge.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 4e52fd4..cf717d8 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -15,6 +15,14 @@ support.import_fresh_module('tkinter')
from tkinter import Tcl
from _tkinter import TclError
+tcl_version = _tkinter.TCL_VERSION.split('.')
+try:
+ for i in range(len(tcl_version)):
+ tcl_version[i] = int(tcl_version[i])
+except ValueError:
+ pass
+tcl_version = tuple(tcl_version)
+
class TkinterTest(unittest.TestCase):
@@ -200,9 +208,12 @@ class TclTest(unittest.TestCase):
(('a', 3.4), ('a', 3.4)),
((), ()),
(call('list', 1, '2', (3.4,)), (1, '2', (3.4,))),
- (call('dict', 'create', 1, '\u20ac', b'\xe2\x82\xac', (3.4,)),
- (1, '\u20ac', '\u20ac', (3.4,))),
]
+ if tcl_version >= (8, 5):
+ testcases += [
+ (call('dict', 'create', 1, '\u20ac', b'\xe2\x82\xac', (3.4,)),
+ (1, '\u20ac', '\u20ac', (3.4,))),
+ ]
for arg, res in testcases:
self.assertEqual(splitlist(arg), res, msg=arg)
self.assertRaises(TclError, splitlist, '{')
@@ -234,9 +245,12 @@ class TclTest(unittest.TestCase):
(('a', (2, 3.4)), ('a', (2, 3.4))),
((), ()),
(call('list', 1, '2', (3.4,)), (1, '2', (3.4,))),
- (call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),
- (12, '\u20ac', '\u20ac', (3.4,))),
]
+ if tcl_version >= (8, 5):
+ testcases += [
+ (call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),
+ (12, '\u20ac', '\u20ac', (3.4,))),
+ ]
for arg, res in testcases:
self.assertEqual(split(arg), res, msg=arg)