mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #6157: Fixed tkinter.Text.debug(). Original patch by Guilherme Polo.
This commit is contained in:
parent
2849e0dfb7
commit
0b9e815d8d
4 changed files with 29 additions and 2 deletions
|
@ -610,6 +610,19 @@ class TextTest(AbstractWidgetTest, unittest.TestCase):
|
|||
else:
|
||||
self.checkEnumParam(widget, 'wrap', 'char', 'none', 'word')
|
||||
|
||||
def test_bbox(self):
|
||||
widget = self.create()
|
||||
bbox = widget.bbox('1.1')
|
||||
self.assertEqual(len(bbox), 4)
|
||||
for item in bbox:
|
||||
self.assertIsInstance(item, int)
|
||||
|
||||
self.assertIsNone(widget.bbox('end'))
|
||||
self.assertRaises(tkinter.TclError, widget.bbox, 'noindex')
|
||||
self.assertRaises(tkinter.TclError, widget.bbox, None)
|
||||
self.assertRaises(tkinter.TclError, widget.bbox)
|
||||
self.assertRaises(tkinter.TclError, widget.bbox, '1.1', 'end')
|
||||
|
||||
|
||||
@add_standard_options(PixelSizeTests, StandardOptionsTests)
|
||||
class CanvasTest(AbstractWidgetTest, unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue