summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-02 07:58:40 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-02 07:58:40 (GMT)
commitb452f41cc82a9627d9a29b5ff6853af06ed3083f (patch)
tree3fa7bb1668df279bfa8b08ce33f6072238182394 /Lib/test/test_tcl.py
parent1399a01b903a6cdf2ecd9d8e479197d94b8b721c (diff)
parentf7de3dd02d5186f30f69b80f5ee00376581f1d23 (diff)
downloadcpython-b452f41cc82a9627d9a29b5ff6853af06ed3083f.zip
cpython-b452f41cc82a9627d9a29b5ff6853af06ed3083f.tar.gz
cpython-b452f41cc82a9627d9a29b5ff6853af06ed3083f.tar.bz2
Issue #21526: Fixed support of new boolean type in Tcl 8.5.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index d0251aa..ad62671 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -378,6 +378,21 @@ class TclTest(unittest.TestCase):
if tcl_version >= (8, 5):
check('2**64', True)
+ def test_booleans(self):
+ tcl = self.interp
+ def check(expr, expected):
+ result = tcl.call('expr', expr)
+ self.assertEqual(result, expected)
+ self.assertIsInstance(result, int)
+ check('true', True)
+ check('yes', True)
+ check('on', True)
+ check('false', False)
+ check('no', False)
+ check('off', False)
+ check('1 < 2', True)
+ check('1 > 2', False)
+
def test_passing_values(self):
def passValue(value):
return self.interp.call('set', '_', value)