summaryrefslogtreecommitdiffstats
path: root/Lib
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)
commitf7de3dd02d5186f30f69b80f5ee00376581f1d23 (patch)
tree6ed2b1f99eaf7b72b5464fb5e0a09ba23ce3ec1c /Lib
parentf41f8f99744230beb78efca71033a288107e3547 (diff)
downloadcpython-f7de3dd02d5186f30f69b80f5ee00376581f1d23.zip
cpython-f7de3dd02d5186f30f69b80f5ee00376581f1d23.tar.gz
cpython-f7de3dd02d5186f30f69b80f5ee00376581f1d23.tar.bz2
Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
Diffstat (limited to 'Lib')
-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 da8f629..d01f969 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)