diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-06-02 18:31:07 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-06-02 18:31:07 (GMT) |
commit | fc14ad996237839e601d08ac05bd6fe7838a8502 (patch) | |
tree | 3ce35e5c86e4929e9b73f1f100a778b8d374606c /Lib/tkinter/test/test_ttk | |
parent | 90441e857d2f0d0224899a328e89fd8d694e45ef (diff) | |
download | cpython-fc14ad996237839e601d08ac05bd6fe7838a8502.zip cpython-fc14ad996237839e601d08ac05bd6fe7838a8502.tar.gz cpython-fc14ad996237839e601d08ac05bd6fe7838a8502.tar.bz2 |
Issue #6181: Fixed minor bugs in tkinter.Listbox methods:
bbox(), curselection() and get().
Diffstat (limited to 'Lib/tkinter/test/test_ttk')
-rw-r--r-- | Lib/tkinter/test/test_ttk/test_widgets.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py index 3ac14be..41927dd 100644 --- a/Lib/tkinter/test/test_ttk/test_widgets.py +++ b/Lib/tkinter/test/test_ttk/test_widgets.py @@ -460,10 +460,7 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase): def test_bbox(self): - self.assertEqual(len(self.entry.bbox(0)), 4) - for item in self.entry.bbox(0): - self.assertIsInstance(item, int) - + self.assertIsBoundingBox(self.entry.bbox(0)) self.assertRaises(tkinter.TclError, self.entry.bbox, 'noindex') self.assertRaises(tkinter.TclError, self.entry.bbox, None) @@ -1216,12 +1213,7 @@ class TreeviewTest(AbstractWidgetTest, unittest.TestCase): self.assertTrue(children) bbox = self.tv.bbox(children[0]) - self.assertEqual(len(bbox), 4) - self.assertIsInstance(bbox, tuple) - for item in bbox: - if not isinstance(item, int): - self.fail("Invalid bounding box: %s" % bbox) - break + self.assertIsBoundingBox(bbox) # compare width in bboxes self.tv['columns'] = ['test'] |