From f7de3dd02d5186f30f69b80f5ee00376581f1d23 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 2 Apr 2015 10:35:57 +0300 Subject: Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. --- Lib/test/test_tcl.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Lib/test/test_tcl.py') diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index da8f6299d6b..d01f9694dfb 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) -- cgit v1.2.3