summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-02 07:35:57 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-02 07:35:57 (GMT)
commitcba6b5d0456d05a198a13c4fbdea96ba95b9f5a3 (patch)
treea15513fb712e068dbbf74d4439e6fa5617ab898e /Lib/test/test_tcl.py
parentdf11d4cbe47e724edc9bd226c46ffc4d055a9e20 (diff)
downloadcpython-cba6b5d0456d05a198a13c4fbdea96ba95b9f5a3.zip
cpython-cba6b5d0456d05a198a13c4fbdea96ba95b9f5a3.tar.gz
cpython-cba6b5d0456d05a198a13c4fbdea96ba95b9f5a3.tar.bz2
Issue #21526: Tkinter now supports 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 5836989..53f0fba 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -391,6 +391,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)