mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.
Tkinter's getdouble() now supports any numbers (in particular int).
This commit is contained in:
parent
008d88b462
commit
645058d11a
9 changed files with 115 additions and 84 deletions
|
@ -163,10 +163,10 @@ class TclTest(unittest.TestCase):
|
|||
self.assertEqual(tcl.getdouble(' 42 '), 42.0)
|
||||
self.assertEqual(tcl.getdouble(' 42.5 '), 42.5)
|
||||
self.assertEqual(tcl.getdouble(42.5), 42.5)
|
||||
self.assertEqual(tcl.getdouble(42), 42.0)
|
||||
self.assertRaises(TypeError, tcl.getdouble)
|
||||
self.assertRaises(TypeError, tcl.getdouble, '42.5', '10')
|
||||
self.assertRaises(TypeError, tcl.getdouble, b'42.5')
|
||||
self.assertRaises(TypeError, tcl.getdouble, 42)
|
||||
self.assertRaises(TclError, tcl.getdouble, 'a')
|
||||
self.assertRaises((TypeError, ValueError, TclError),
|
||||
tcl.getdouble, '42.5\0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue