mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -122,10 +122,10 @@ class TestIntVar(TestBase):
|
|||
def test_invalid_value(self):
|
||||
v = IntVar(self.root, name="name")
|
||||
self.root.globalsetvar("name", "value")
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaises((ValueError, TclError)):
|
||||
v.get()
|
||||
self.root.globalsetvar("name", "345.0")
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaises((ValueError, TclError)):
|
||||
v.get()
|
||||
|
||||
|
||||
|
@ -152,7 +152,7 @@ class TestDoubleVar(TestBase):
|
|||
def test_invalid_value(self):
|
||||
v = DoubleVar(self.root, name="name")
|
||||
self.root.globalsetvar("name", "value")
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaises((ValueError, TclError)):
|
||||
v.get()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue