diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-30 18:52:02 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-30 18:52:02 +0200 |
commit | 016a9acb2603f07866c060cb14b655b9d9b822fa (patch) | |
tree | aadf86d83353c7be1fcbed3667e6be084d15ce44 /Lib/tkinter/test/test_tkinter/test_variables.py | |
parent | 998c9cdd423409e2b40e02eb41614536f9d8005c (diff) | |
parent | 32c0d3ada52109f339c081d3408546a4af024b3c (diff) | |
download | cpython-016a9acb2603f07866c060cb14b655b9d9b822fa.tar.gz cpython-016a9acb2603f07866c060cb14b655b9d9b822fa.zip |
Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
by representing the scale as float value internally in Tk. tkinter.IntVar
now works if float value is set to underlying Tk variable.
Diffstat (limited to 'Lib/tkinter/test/test_tkinter/test_variables.py')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_variables.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_variables.py b/Lib/tkinter/test/test_tkinter/test_variables.py index 44858173c43..2eb1e12671d 100644 --- a/Lib/tkinter/test/test_tkinter/test_variables.py +++ b/Lib/tkinter/test/test_tkinter/test_variables.py @@ -217,15 +217,14 @@ class TestIntVar(TestBase): self.assertEqual(123, v.get()) self.root.globalsetvar("name", "345") self.assertEqual(345, v.get()) + self.root.globalsetvar("name", "876.5") + self.assertEqual(876, v.get()) def test_invalid_value(self): v = IntVar(self.root, name="name") self.root.globalsetvar("name", "value") with self.assertRaises((ValueError, TclError)): v.get() - self.root.globalsetvar("name", "345.0") - with self.assertRaises((ValueError, TclError)): - v.get() class TestDoubleVar(TestBase): |