summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-03 12:13:08 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-03 12:13:08 (GMT)
commit8630f16eb7393649d501dd3f6982d15c799e24ee (patch)
tree58a6fe262cf556fcb77cb5be7dcf9cafba2508fa /Lib/lib-tk/test
parent6bf15d10a6b01e8408bee4cad1ff3c28a2f378ae (diff)
downloadcpython-8630f16eb7393649d501dd3f6982d15c799e24ee.zip
cpython-8630f16eb7393649d501dd3f6982d15c799e24ee.tar.gz
cpython-8630f16eb7393649d501dd3f6982d15c799e24ee.tar.bz2
Issue #6160: The bbox() method of Tkinter.Spinbox now returns a tuple of
integers instead of a string. Based on patch by Guilherme Polo.
Diffstat (limited to 'Lib/lib-tk/test')
-rw-r--r--Lib/lib-tk/test/test_tkinter/test_widgets.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/lib-tk/test/test_tkinter/test_widgets.py b/Lib/lib-tk/test/test_tkinter/test_widgets.py
index 1380a73..cfbc0b3 100644
--- a/Lib/lib-tk/test/test_tkinter/test_widgets.py
+++ b/Lib/lib-tk/test/test_tkinter/test_widgets.py
@@ -454,6 +454,18 @@ class SpinboxTest(EntryTest, unittest.TestCase):
widget = self.create()
self.checkBooleanParam(widget, 'wrap')
+ def test_bbox(self):
+ widget = self.create()
+ bbox = widget.bbox(0)
+ self.assertEqual(len(bbox), 4)
+ for item in bbox:
+ self.assertIsInstance(item, int)
+
+ self.assertRaises(Tkinter.TclError, widget.bbox, 'noindex')
+ self.assertRaises(Tkinter.TclError, widget.bbox, None)
+ self.assertRaises(TypeError, widget.bbox)
+ self.assertRaises(TypeError, widget.bbox, 0, 1)
+
@add_standard_options(StandardOptionsTests)
class TextTest(AbstractWidgetTest, unittest.TestCase):