diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-04 09:44:30 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-04 09:44:30 (GMT) |
commit | 06e66108c6c71e1cc2b6a0c1d4cd8d245469632f (patch) | |
tree | 538f1b9c7cb6dd16720000b232038d17ad0f3dbd /Lib/test/test_tcl.py | |
parent | 46ba6c8563922f043cad6423202ee0119614c807 (diff) | |
parent | 9a6e201f7d5f147b776274c1598089fc68859e98 (diff) | |
download | cpython-06e66108c6c71e1cc2b6a0c1d4cd8d245469632f.zip cpython-06e66108c6c71e1cc2b6a0c1d4cd8d245469632f.tar.gz cpython-06e66108c6c71e1cc2b6a0c1d4cd8d245469632f.tar.bz2 |
Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
returns bool. tkinter.BooleanVar now validates input values (accepted bool,
int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns bool.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r-- | Lib/test/test_tcl.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index 6fd2d07..83b4c9a 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -179,7 +179,8 @@ class TclTest(unittest.TestCase): tcl = self.interp.tk self.assertIs(tcl.getboolean('on'), True) self.assertIs(tcl.getboolean('1'), True) - self.assertEqual(tcl.getboolean(42), 42) + self.assertIs(tcl.getboolean(42), True) + self.assertIs(tcl.getboolean(0), False) self.assertRaises(TypeError, tcl.getboolean) self.assertRaises(TypeError, tcl.getboolean, 'on', '1') self.assertRaises(TypeError, tcl.getboolean, b'on') |