(self)
| 624 | self.assertEqual(str(widget2['orient']), 'horizontal') |
| 625 | |
| 626 | def test_add(self): |
| 627 | # attempt to add a child that is not a direct child of the paned window |
| 628 | label = ttk.Label(self.paned) |
| 629 | child = ttk.Label(label) |
| 630 | self.assertRaises(tkinter.TclError, self.paned.add, child) |
| 631 | label.destroy() |
| 632 | child.destroy() |
| 633 | # another attempt |
| 634 | label = ttk.Label(self.root) |
| 635 | child = ttk.Label(label) |
| 636 | self.assertRaises(tkinter.TclError, self.paned.add, child) |
| 637 | child.destroy() |
| 638 | label.destroy() |
| 639 | |
| 640 | good_child = ttk.Label(self.root) |
| 641 | self.paned.add(good_child) |
| 642 | # re-adding a child is not accepted |
| 643 | self.assertRaises(tkinter.TclError, self.paned.add, good_child) |
| 644 | |
| 645 | other_child = ttk.Label(self.paned) |
| 646 | self.paned.add(other_child) |
| 647 | self.assertEqual(self.paned.pane(0), self.paned.pane(1)) |
| 648 | self.assertRaises(tkinter.TclError, self.paned.pane, 2) |
| 649 | good_child.destroy() |
| 650 | other_child.destroy() |
| 651 | self.assertRaises(tkinter.TclError, self.paned.pane, 0) |
| 652 | |
| 653 | def test_forget(self): |
| 654 | self.assertRaises(tkinter.TclError, self.paned.forget, None) |
nothing calls this directly
no test coverage detected