Issue #6160: The bbox() method of tkinter.Spinbox now returns a tuple of

integers instead of a string.  Based on patch by Guilherme Polo.
This commit is contained in:
Serhiy Storchaka 2013-11-03 14:13:34 +02:00
parent 0bdcdecca7
commit 2849e0dfb7
3 changed files with 16 additions and 1 deletions

View file

@ -457,6 +457,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):