Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.

This commit is contained in:
Serhiy Storchaka 2015-04-02 10:35:57 +03:00
parent f41f8f9974
commit f7de3dd02d
3 changed files with 51 additions and 15 deletions

View file

@ -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)