diff options
Diffstat (limited to 'Lib/tkinter/test/widget_tests.py')
-rw-r--r-- | Lib/tkinter/test/widget_tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/tkinter/test/widget_tests.py index d983acc..26bf162 100644 --- a/Lib/tkinter/test/widget_tests.py +++ b/Lib/tkinter/test/widget_tests.py @@ -202,6 +202,16 @@ class AbstractWidgetTest: def checkVariableParam(self, widget, name, var): self.checkParam(widget, name, var, conv=str) + def assertIsBoundingBox(self, bbox): + self.assertIsNotNone(bbox) + self.assertIsInstance(bbox, tuple) + if len(bbox) != 4: + self.fail('Invalid bounding box: %r' % (bbox,)) + for item in bbox: + if not isinstance(item, int): + self.fail('Invalid bounding box: %r' % (bbox,)) + break + class StandardOptionsTests: STANDARD_OPTIONS = ( |