diff options
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r-- | Lib/test/test_tcl.py | 15 |
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) |