From 32c0d3ada52109f339c081d3408546a4af024b3c Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 30 Oct 2016 18:49:52 +0200 Subject: 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. --- Lib/tkinter/test/test_tkinter/test_variables.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Lib/tkinter/test/test_tkinter/test_variables.py') diff --git a/Lib/tkinter/test/test_tkinter/test_variables.py b/Lib/tkinter/test/test_tkinter/test_variables.py index 1f74453cea6..d8ba9cea747 100644 --- a/Lib/tkinter/test/test_tkinter/test_variables.py +++ b/Lib/tkinter/test/test_tkinter/test_variables.py @@ -167,15 +167,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): -- cgit v1.2.3