diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 12:13:34 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-03 12:13:34 (GMT) |
commit | 2849e0dfb7ed722eec601ffd9b18523019e151b2 (patch) | |
tree | 1cd61dbfb4f4932d187546d48a2b2783d7e08ae4 /Lib/tkinter/test/test_tkinter/test_widgets.py | |
parent | 0bdcdecca7736151278097784720be08cbdc221c (diff) | |
download | cpython-2849e0dfb7ed722eec601ffd9b18523019e151b2.zip cpython-2849e0dfb7ed722eec601ffd9b18523019e151b2.tar.gz cpython-2849e0dfb7ed722eec601ffd9b18523019e151b2.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/tkinter/test/test_tkinter/test_widgets.py')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_widgets.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 141bbf6..7b89c74 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -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): |